Browse Source

Merge branch 'dev_screen_data_2.0' into dev_temp

master
wxz 5 years ago
parent
commit
011bd4441c
  1. 2
      epmet-cloud-generator/src/main/resources/application.yml
  2. 41
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
  3. 16
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AblityIndexFormDTO.java
  4. 15
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AblityListFormDTO.java
  5. 16
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthAblityListFormDTO.java
  6. 19
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthScoreListFormDTO.java
  7. 35
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/PartIndexScroeRankFormDTO.java
  8. 15
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/PeerComparisonFormDTO.java
  9. 5
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/RootAgencyFormDTO.java
  10. 14
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScoreListFormDTO.java
  11. 35
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/UserPointRankFormDTO.java
  12. 8
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityIndexResultDTO.java
  13. 45
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartIndexScroeRankResultDTO.java
  14. 8
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PeerComparisonResultDTO.java
  15. 46
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserPointRankListResultDTO.java
  16. 4
      epmet-module/data-report/data-report-server/pom.xml
  17. 12
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/FactConstant.java
  18. 29
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java
  19. 22
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java
  20. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java
  21. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java
  22. 5
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java
  23. 19
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java
  24. 177
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java
  25. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java
  26. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java
  27. 56
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenUserController.java
  28. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java
  29. 18
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java
  30. 13
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java
  31. 18
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java
  32. 28
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java
  33. 20
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridSubScoreDao.java
  34. 5
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java
  35. 22
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java
  36. 30
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenUserService.java
  37. 10
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java
  38. 36
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java
  39. 61
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenUserServiceImpl.java
  40. 338
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java
  41. 45
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml
  42. 8
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml
  43. 45
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml
  44. 8
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml
  45. 61
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml
  46. 35
      epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml
  47. 2
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml
  48. 1
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml
  49. 10
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
  50. 54
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml
  51. 1
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java
  52. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/IssueMainDailyFormDTO.java
  53. 97
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ScreenPartyBranchDataFormDTO.java
  54. 73
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ScreenPartyLinkMassesDataFormDTO.java
  55. 19
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridInfoResultDTO.java
  56. 23
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridPartyDTO.java
  57. 23
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridPartyGuideDTO.java
  58. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueInfoResultDTO.java
  59. 25
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/OrgNameResultDTO.java
  60. 1
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/GridInfoDTO.java
  61. 26
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenCentralZoneDataFormDTO.java
  62. 9
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java
  63. 5
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java
  64. 26
      epmet-module/data-statistical/data-statistical-server/pom.xml
  65. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java
  66. 20
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
  67. 55
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java
  68. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java
  69. 159
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java
  70. 35
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenExtractDailyController.java
  71. 108
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ShiBeiScreenCollController.java
  72. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java
  73. 48
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java
  74. 21
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java
  75. 25
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java
  76. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySelfSubScoreDao.java
  77. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java
  78. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySelfSubScoreDao.java
  79. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java
  80. 39
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSelfSubScoreDao.java
  81. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSubScoreDao.java
  82. 25
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java
  83. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java
  84. 19
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
  85. 46
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java
  86. 19
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java
  87. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java
  88. 29
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java
  89. 32
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java
  90. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java
  91. 22
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerPartymemberDao.java
  92. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java
  93. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGroupGridDailyDao.java
  94. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueGridDailyDao.java
  95. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/topic/FactTopicTotalGridDailyDao.java
  96. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridDailyDao.java
  97. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java
  98. 100
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSelfSubScoreEntity.java
  99. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java
  100. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java

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_evaluation_index?useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://192.168.1.130:3306/epmet_data_statistical?useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: epmet_dba
password: EpmEt-dbA-UsEr
#oracle配置

41
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java

@ -19,8 +19,11 @@ import org.joda.time.format.DateTimeFormatter;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.DateTimeException;
import java.time.ZoneId;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* 日期处理工具类
@ -640,4 +643,42 @@ public class DateUtils {
}
return minusMonthId;
}
/**
* @Description 根据传入的时间维度判断格式
* @param dimension
* @return
* @author wangc
* @date 2020.09.24 10:11
**/
public static String identifyTimeDimension(String dimension){
//yyyyMMdd DATE_PATTERN_YYYYMMDD
//yyyyMM DATE_PATTERN_YYYYMM
//yyyy DATE_PATTERN_YYYY
//yyyyWcc
//yyyyQc
if(dimension.length() == NumConstant.EIGHT){
SimpleDateFormat df = new SimpleDateFormat(DATE_PATTERN_YYYYMMDD);
try{ df.parse(dimension); }catch (ParseException e){ return null; }
return "date";
}else if(dimension.length() == NumConstant.FOUR){
SimpleDateFormat df = new SimpleDateFormat(DATE_PATTERN_YYYY);
try{df.parse(dimension);}catch (ParseException e){return null;}
return "year";
}else if(dimension.length() == NumConstant.SEVEN){
if(dimension.contains("W")){
return "week";
}else return null;
}else if(dimension.length() == NumConstant.SIX){
if(dimension.contains("Q")){
return "quarter";
}else{
SimpleDateFormat df = new SimpleDateFormat(DATE_PATTERN_YYYYMM);
try{df.parse(dimension);}catch (ParseException e){return null;}
return "month";
}
}else return null;
}
}

16
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AblityIndexFormDTO.java

@ -3,7 +3,6 @@ package com.epmet.evaluationindex.screen.dto.form;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@ -15,19 +14,24 @@ import java.io.Serializable;
public class AblityIndexFormDTO implements Serializable {
private static final long serialVersionUID = -2880432640584616651L;
/**
* 查询月份的前12个月对应的monthId
* 组织或网格Id
*/
private String startMonthId;
@NotBlank(message = "组织或网格ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class})
private String orgId;
/**
* 组织Id
*/
@NotBlank(message = "客户ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class})
private String customerId;
/**
* 组织Id
* 组织或网格类型
*/
@NotBlank(message = "组织ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class})
private String agencyId;
@NotBlank(message = "组织或网格类型不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class})
private String orgType;
/**
* 查询月份的前12个月对应的monthId
*/
private String startMonthId;
/**
* 月份Id格式202009
*/

15
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AblityListFormDTO.java

@ -14,15 +14,21 @@ import java.io.Serializable;
public class AblityListFormDTO implements Serializable {
private static final long serialVersionUID = -2880432640584616651L;
/**
* 组织Id
* 客户Id
*/
@NotBlank(message = "客户ID不能为空",groups = {AblityListFormDTO.AddUserInternalGroup.class})
private String customerId;
/**
* 组织Id
* 组织或网格Id
*/
@NotBlank(message = "组织ID不能为空",groups = {AblityListFormDTO.AddUserInternalGroup.class})
private String agencyId;
@NotBlank(message = "组织或网格ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class})
private String orgId;
/**
* 组织或网格类型
*/
@NotBlank(message = "组织或网格类型不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class})
private String orgType;
public interface AddUserInternalGroup {}
/**
* 月份Id格式202009
*/
@ -37,6 +43,5 @@ public class AblityListFormDTO implements Serializable {
* 所有有权重的指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
public interface AddUserInternalGroup {}
}

16
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthAblityListFormDTO.java

@ -14,15 +14,21 @@ import java.io.Serializable;
public class MonthAblityListFormDTO implements Serializable {
private static final long serialVersionUID = -2880432640584616651L;
/**
* 组织Id
* 客户Id
*/
@NotBlank(message = "客户ID不能为空",groups = {MonthAblityListFormDTO.AddUserInternalGroup.class})
private String customerId;
/**
* 组织Id
* 组织或网格Id
*/
@NotBlank(message = "组织ID不能为空",groups = {MonthAblityListFormDTO.AddUserInternalGroup.class})
private String agencyId;
@NotBlank(message = "组织或网格ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class})
private String orgId;
/**
* 组织或网格类型
*/
@NotBlank(message = "组织或网格类型不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class})
private String orgType;
public interface AddUserInternalGroup {}
/**
* 月份Id格式202009
*/
@ -37,7 +43,5 @@ public class MonthAblityListFormDTO implements Serializable {
* 查询月份的前12个月对应的monthId
*/
private String startMonthId;
public interface AddUserInternalGroup {}
}

19
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthScoreListFormDTO.java

@ -13,21 +13,34 @@ import java.io.Serializable;
@Data
public class MonthScoreListFormDTO implements Serializable {
private static final long serialVersionUID = -2880432640584616651L;
/**
* 组织或网格Id
*/
@NotBlank(message = "组织或网格ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class})
private String orgId;
/**
* 组织Id
*/
@NotBlank(message = "客户ID不能为空",groups = {MonthScoreListFormDTO.AddUserInternalGroup.class})
private String customerId;
/**
* 组织Id
* 组织或网格类型
*/
@NotBlank(message = "组织ID不能为空",groups = {MonthScoreListFormDTO.AddUserInternalGroup.class})
private String agencyId;
@NotBlank(message = "组织或网格类型不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class})
private String orgType;
/**
* 类型党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli
*/
private String indexCode;
/**
* 月份Id格式202009
*/
@NotBlank(message = "月份ID不能为空",groups = {MonthScoreListFormDTO.AddUserInternalGroup.class})
private String monthId;
/**
* 查询月份的前12个月对应的monthId
*/
private String startMonthId;
public interface AddUserInternalGroup {}
}

35
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/PartIndexScroeRankFormDTO.java

@ -0,0 +1,35 @@
package com.epmet.evaluationindex.screen.dto.form;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 党员指标得分排行--接口入参
* @Author sun
*/
@Data
public class PartIndexScroeRankFormDTO implements Serializable {
private static final long serialVersionUID = -2880432640584616651L;
/**
* 组织或网格Id
*/
@NotBlank(message = "组织或网格ID不能为空",groups = {PartIndexScroeRankFormDTO.AddUserInternalGroup.class})
private String orgId;
/**
* 类型组织agency 网格grid
*/
@NotBlank(message = "数据类型不能为空",groups = {PartIndexScroeRankFormDTO.AddUserInternalGroup.class})
private String orgType;
/**
* 默认显示前5名
*/
@Min(value = 1, message = "查询条数必须大于0", groups = {PartIndexScroeRankFormDTO.AddUserInternalGroup.class })
private Integer topNum;
public interface AddUserInternalGroup {}
}

15
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/PeerComparisonFormDTO.java

@ -15,15 +15,21 @@ import java.io.Serializable;
public class PeerComparisonFormDTO implements Serializable {
private static final long serialVersionUID = -2880432640584616651L;
/**
* 组织Id
* 客户Id
*/
@NotBlank(message = "客户ID不能为空",groups = {PeerComparisonFormDTO.AddUserInternalGroup.class})
private String customerId;
/**
* 组织Id
* 组织或网格Id
*/
@NotBlank(message = "组织ID不能为空",groups = {PeerComparisonFormDTO.AddUserInternalGroup.class})
private String agencyId;
@NotBlank(message = "组织或网格ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class})
private String orgId;
/**
* 组织或网格类型
*/
@NotBlank(message = "组织或网格类型不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class})
private String orgType;
public interface AddUserInternalGroup {}
/**
* 类型党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli
*/
@ -34,6 +40,5 @@ public class PeerComparisonFormDTO implements Serializable {
*/
@Min(value = 1, message = "查询条数必须大于0", groups = {PeerComparisonFormDTO.AddUserInternalGroup.class })
private Integer pageSize;
public interface AddUserInternalGroup {}
}

5
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/RootAgencyFormDTO.java

@ -3,7 +3,6 @@ package com.epmet.evaluationindex.screen.dto.form;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@ -14,12 +13,12 @@ import java.io.Serializable;
@Data
public class RootAgencyFormDTO implements Serializable {
private static final long serialVersionUID = -2880432640584616651L;
public interface AddUserInternalGroup {}
/**
* 组织Id
*/
@NotBlank(message = "组织ID不能为空",groups = {RootAgencyFormDTO.AddUserInternalGroup.class})
private String agencyId;
public interface AddUserInternalGroup {}
}

14
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScoreListFormDTO.java

@ -13,16 +13,22 @@ import java.io.Serializable;
@Data
public class ScoreListFormDTO implements Serializable {
private static final long serialVersionUID = -2880432640584616651L;
/**
* 组织或网格Id
*/
@NotBlank(message = "组织或网格ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class})
private String orgId;
/**
* 组织Id
*/
@NotBlank(message = "客户ID不能为空",groups = {ScoreListFormDTO.AddUserInternalGroup.class})
private String customerId;
/**
* 组织Id
* 组织或网格类型
*/
@NotBlank(message = "组织ID不能为空",groups = {ScoreListFormDTO.AddUserInternalGroup.class})
private String agencyId;
@NotBlank(message = "组织或网格类型不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class})
private String orgType;
public interface AddUserInternalGroup {}
/**
* 月份Id格式202009
*/
@ -33,6 +39,4 @@ public class ScoreListFormDTO implements Serializable {
*/
private String indexCode;
public interface AddUserInternalGroup {}
}

35
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/UserPointRankFormDTO.java

@ -0,0 +1,35 @@
package com.epmet.evaluationindex.screen.dto.form;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 热心市民积分排行列表--接口入参
* @Author sun
*/
@Data
public class UserPointRankFormDTO implements Serializable {
private static final long serialVersionUID = -2880432640584616651L;
/**
* 组织或网格Id
*/
@NotBlank(message = "组织或网格ID不能为空",groups = {UserPointRankFormDTO.AddUserInternalGroup.class})
private String orgId;
/**
* 类型组织agency 网格grid
*/
@NotBlank(message = "数据类型不能为空",groups = {UserPointRankFormDTO.AddUserInternalGroup.class})
private String orgType;
/**
* 默认显示前5名
*/
@Min(value = 1, message = "查询条数必须大于0", groups = {UserPointRankFormDTO.AddUserInternalGroup.class })
private Integer topNum;
public interface AddUserInternalGroup {}
}

8
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AblityIndexResultDTO.java

@ -29,14 +29,6 @@ public class AblityIndexResultDTO implements Serializable {
* 能力总分
*/
private Double indexTotal;
/**
* 本级能力分
*/
private Double agencyScore;
/**
* 下级能力分
*/
private Double subAgencyScore;
/**
* 横坐标202009
*/

45
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartIndexScroeRankResultDTO.java

@ -0,0 +1,45 @@
package com.epmet.evaluationindex.screen.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 党员指标得分排行--接口返参
* @Author sun
*/
@Data
public class PartIndexScroeRankResultDTO implements Serializable {
private static final long serialVersionUID = 3860268744336541373L;
/**
* 组织ID
*/
private String agencyId;
/**
* 组织名称
*/
private String agencyName;
/**
* 用户Id
*/
private String userId;
/**
* 用户名称
*/
private String userName;
/**
* 网格Id
*/
private String gridId;
/**
* 网格名称
*/
private String gridName;
/**
* 党员指标得分
*/
private Integer indexScore;
}

8
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PeerComparisonResultDTO.java

@ -14,13 +14,13 @@ public class PeerComparisonResultDTO implements Serializable {
private static final long serialVersionUID = 3860268744336541373L;
/**
* 组织Id
* 组织或网格Id
*/
private String agencyId;
private String orgId;
/**
* 组织名称
* 组织或网格名称
*/
private String agencyName;
private String orgName;
/**
* 能力分值(保留一位小数)
*/

46
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserPointRankListResultDTO.java

@ -0,0 +1,46 @@
package com.epmet.evaluationindex.screen.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 热心市民积分排行列表--接口返参
* @Author sun
*/
@Data
public class UserPointRankListResultDTO implements Serializable {
private static final long serialVersionUID = 3860268744336541373L;
/**
* 组织ID
*/
private String agencyId;
/**
* 组织名称
*/
private String agencyName;
/**
* 用户Id
*/
private String userId;
/**
* 用户名称
*/
private String userName;
/**
* 网格Id
*/
private String gridId;
/**
* 网格名称
*/
private String gridName;
/**
* 用户积分
*/
private Integer pointTotal;
}

4
epmet-module/data-report/data-report-server/pom.xml

@ -62,11 +62,11 @@
<version>0.3.1</version>
</dependency>
<dependency>
<!--<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-extapp-auth</artifactId>
<version>2.0.0</version>
</dependency>
</dependency>-->
<!--动态数据源-->
<dependency>
<groupId>com.epmet</groupId>

12
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/FactConstant.java

@ -5,6 +5,14 @@ package com.epmet.datareport.constant;
* @dscription 数据
*/
public interface FactConstant {
/**
* 组织类型
*/
String AGENCY = "agency";
/**
* 网格类型
*/
String GRID = "grid";
/**
* 能力指标
*/
@ -33,4 +41,8 @@ public interface FactConstant {
* 社区相关
*/
String SHE_QU_XIANG_GUAN = "shequxiangguan";
/**
* 网格相关
*/
String WANG_GE_XIANG_GUAN = "wanggexiangguan";
}

29
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java

@ -17,6 +17,7 @@ import java.util.List;
/**
* 数据改版api
*
* @author sun
*/
@RestController
@ -28,77 +29,77 @@ public class FactIndexController {
/**
* @param tokenDTO
* @Description 能力指数
* @Description 能力指数
* @author sun
*/
@PostMapping("index/ablityindex")
public Result<List<AblityIndexResultDTO>> ablityIndex(@LoginUser TokenDto tokenDTO, @RequestBody AblityIndexFormDTO formDTO){
public Result<List<AblityIndexResultDTO>> ablityIndex(@LoginUser TokenDto tokenDTO, @RequestBody AblityIndexFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AblityIndexFormDTO.AddUserInternalGroup.class);
return new Result<List<AblityIndexResultDTO>>().ok(factIndexService.ablityIndex(formDTO));
}
/**
* @param tokenDTO
* @Description 按月份查询各项能力分数
* @Description 按月份查询各项能力分数
* @author sun
*/
@PostMapping("index/scorelist")
public Result<List<ScoreListResultDTO>> scoreList(@LoginUser TokenDto tokenDTO, @RequestBody ScoreListFormDTO formDTO){
public Result<List<ScoreListResultDTO>> scoreList(@LoginUser TokenDto tokenDTO, @RequestBody ScoreListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ScoreListFormDTO.AddUserInternalGroup.class);
return new Result<List<ScoreListResultDTO>>().ok(factIndexService.scoreList(formDTO));
}
/**
* @param tokenDTO
* @Description 按月份查询各项能力最近12个月得分
* @Description 按月份查询各项能力最近12个月得分
* @author sun
*/
@PostMapping("index/monthscorelist")
public Result<List<MonthScoreListResultDTO>> monthScoreList(@LoginUser TokenDto tokenDTO, @RequestBody MonthScoreListFormDTO formDTO){
public Result<List<MonthScoreListResultDTO>> monthScoreList(@LoginUser TokenDto tokenDTO, @RequestBody MonthScoreListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, MonthScoreListFormDTO.AddUserInternalGroup.class);
return new Result<List<MonthScoreListResultDTO>>().ok(factIndexService.monthScoreList(formDTO));
}
/**
* @param tokenDTO
* @Description 按月查询各项指标数据
* @Description 按月查询各项指标数据
* @author sun
*/
@PostMapping("index/ablitylist")
public Result<List<AblityListResultDTO>> ablityList(@LoginUser TokenDto tokenDTO, @RequestBody AblityListFormDTO formDTO){
public Result<List<AblityListResultDTO>> ablityList(@LoginUser TokenDto tokenDTO, @RequestBody AblityListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AblityListFormDTO.AddUserInternalGroup.class);
return new Result<List<AblityListResultDTO>>().ok(factIndexService.ablityList(formDTO));
}
/**
* @param tokenDTO
* @Description 按月查询各项指标最近12个月数据
* @Description 按月查询各项指标最近12个月数据
* @author sun
*/
@PostMapping("index/monthablitylist")
public Result<List<MonthAblityListResultDTO>> monthAblityList(@LoginUser TokenDto tokenDTO, @RequestBody MonthAblityListFormDTO formDTO){
public Result<List<MonthAblityListResultDTO>> monthAblityList(@LoginUser TokenDto tokenDTO, @RequestBody MonthAblityListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, MonthAblityListFormDTO.AddUserInternalGroup.class);
return new Result<List<MonthAblityListResultDTO>>().ok(factIndexService.monthAblityList(formDTO));
}
/**
* @param tokenDTO
* @Description 同级对比各项数据查询
* @Description 同级对比各项数据查询
* @author sun
*/
@PostMapping("index/peercomparison")
public Result<List<PeerComparisonResultDTO>> peerComparison(@LoginUser TokenDto tokenDTO, @RequestBody PeerComparisonFormDTO formDTO){
public Result<List<PeerComparisonResultDTO>> peerComparison(@LoginUser TokenDto tokenDTO, @RequestBody PeerComparisonFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, PeerComparisonFormDTO.AddUserInternalGroup.class);
return new Result<List<PeerComparisonResultDTO>>().ok(factIndexService.peerComparison(formDTO));
}
/**
* @param tokenDTO
* @Description 是否根组织
* @Description 是否根组织
* @author sun
*/
@PostMapping("index/rootagency")
public Result<RootAgencyResultDTO> rootAgency(@LoginUser TokenDto tokenDTO, @RequestBody RootAgencyFormDTO formDTO){
public Result<RootAgencyResultDTO> rootAgency(@LoginUser TokenDto tokenDTO, @RequestBody RootAgencyFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, RootAgencyFormDTO.AddUserInternalGroup.class);
return new Result<RootAgencyResultDTO>().ok(factIndexService.rootAgency(formDTO));
}

22
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java

@ -1,21 +1,13 @@
package com.epmet.datareport.controller.screen;
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.service.evaluationindex.screen.AgencyService;
import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO;
import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
/**
* 组织相关api
@ -31,19 +23,14 @@ public class AgencyController {
private AgencyService agencyService;
/**
* @Description 1组织机构树
* @param
* @Description 1组织机构树 只返回 is_display = '1'
* @author zxc
* @date 2020/8/18 2:04 下午
*/
@ExternalAppRequestAuth
@PostMapping("tree")
public Result<TreeResultDTO> tree(HttpServletRequest request, ExternalAppRequestParam externalAppRequestParam){
String customerId = request.getHeader("CustomerId");
if(StringUtils.isBlank(externalAppRequestParam.getCustomerId())){
externalAppRequestParam.setCustomerId(customerId);
}
return new Result<TreeResultDTO>().ok(agencyService.tree(externalAppRequestParam));
public Result<TreeResultDTO> tree(@RequestHeader("CustomerId") String customerId){
return new Result<TreeResultDTO>().ok(agencyService.tree(customerId));
}
/**
@ -52,7 +39,6 @@ public class AgencyController {
* @author zxc
* @date 2020/8/18 2:33 下午
*/
@ExternalAppRequestAuth
@PostMapping("compartment")
public Result<CompartmentResultDTO> compartment(@RequestBody CompartmentFormDTO compartmentFormDTO){
ValidatorUtils.validateEntity(compartmentFormDTO, CompartmentFormDTO.Compartment.class);

6
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java

@ -1,6 +1,5 @@
package com.epmet.datareport.controller.screen;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.DistributionService;
@ -33,7 +32,6 @@ public class DistributionController {
* @author zxc
* @date 2020/8/18 10:59 上午
*/
@ExternalAppRequestAuth
@PostMapping("branch")
public Result<List<BranchResultDTO>> branch(@RequestBody BranchFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, BranchFormDTO.Branch.class);
@ -46,7 +44,6 @@ public class DistributionController {
* @author zxc
* @date 2020/8/18 11:10 上午
*/
@ExternalAppRequestAuth
@PostMapping("user")
public Result<UserResultDTO> user(@RequestBody UserFormDTO userFormDTO){
ValidatorUtils.validateEntity(userFormDTO, UserFormDTO.User.class);
@ -59,7 +56,6 @@ public class DistributionController {
* @author zxc
* @date 2020/8/18 11:20 上午
*/
@ExternalAppRequestAuth
@PostMapping("parymember")
public Result<ParymemberResultDTO> parymember(@RequestBody ParymemberFormDTO parymemberFormDTO){
ValidatorUtils.validateEntity(parymemberFormDTO, ParymemberFormDTO.Parymember.class);
@ -72,7 +68,6 @@ public class DistributionController {
* @author zxc
* @date 2020/8/19 1:29 下午
*/
@ExternalAppRequestAuth
@PostMapping("project")
public Result<List<ProjectResultDTO>> project(@RequestBody ProjectFormDTO projectFormDTO){
ValidatorUtils.validateEntity(projectFormDTO, ProjectFormDTO.Project.class);
@ -85,7 +80,6 @@ public class DistributionController {
* @author zxc
* @date 2020/8/19 1:52 下午
*/
@ExternalAppRequestAuth
@PostMapping("topprofile")
public Result<TopProfileResultDTO> topProfile(@RequestBody TopProfileFormDTO topProfileFormDTO){
ValidatorUtils.validateEntity(topProfileFormDTO, TopProfileFormDTO.TopProfile.class);

6
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java

@ -1,6 +1,5 @@
package com.epmet.datareport.controller.screen;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.GrassRootsGovernService;
@ -39,7 +38,6 @@ public class GrassRootsGovernController {
* @author wangc
* @date 2020.08.20 11:16
**/
@ExternalAppRequestAuth
@PostMapping("userpointrank")
public Result<UserPointRankResultDTO> userPointRank(@RequestBody AgencyAndNumFormDTO param){
ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class);
@ -54,7 +52,6 @@ public class GrassRootsGovernController {
* @author wangc
* @date 2020.08.20 13:55
**/
@ExternalAppRequestAuth
@PostMapping("difficultprojects")
public Result<List<DifficultProjectResultDTO>> difficultProject(@RequestBody AgencyNumTypeParamFormDTO param){
ValidatorUtils.validateEntity(param, AgencyNumTypeParamFormDTO.AgencyNumTypeParamGroup.class);
@ -69,7 +66,6 @@ public class GrassRootsGovernController {
* @author wangc
* @date 2020.08.20 14:37
**/
@ExternalAppRequestAuth
@PostMapping("publicpartiprofile")
public Result<PublicPartiProfileResultDTO> publicPartiProfile(@RequestBody AgencyFormDTO param){
ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class);
@ -84,7 +80,6 @@ public class GrassRootsGovernController {
* @author wangc
* @date 2020.08.20 15:32
**/
@ExternalAppRequestAuth
@PostMapping("publicpartirank")
public Result<List<PublicPartiRankResultDTO>> publicPartiRank(@RequestBody AgencyAndNumFormDTO param){
ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class);
@ -99,7 +94,6 @@ public class GrassRootsGovernController {
* @author wangc
* @date 2020.08.20 17:46
**/
@ExternalAppRequestAuth
@PostMapping("governcapacityrank")
public Result<List<GovernCapacityRankResultDTO>> governCapacityRank(@RequestBody AgencyAndNumFormDTO param){
ValidatorUtils.validateEntity(param,AgencyFormDTO.CommonAgencyIdGroup.class);

5
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java

@ -1,6 +1,5 @@
package com.epmet.datareport.controller.screen;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.GrassrootsPartyDevService;
@ -38,7 +37,6 @@ public class GrassrootsPartyDevController {
* @author wangc
* @date 2020.08.18 16:59
**/
@ExternalAppRequestAuth
@PostMapping("basicinfo")
public Result<PartymemberPercentResultDTO> baseInfo(@RequestBody ParymemberFormDTO param){
ValidatorUtils.validateEntity(param, ParymemberFormDTO.Parymember.class);
@ -53,7 +51,6 @@ public class GrassrootsPartyDevController {
* @author wangc
* @date 2020.08.18 17:54
**/
@ExternalAppRequestAuth
@PostMapping("ageinfo")
public Result<PartymemberAgeDistributionResultDTO> ageInfo(@RequestBody ParymemberFormDTO param){
ValidatorUtils.validateEntity(param, ParymemberFormDTO.Parymember.class);
@ -68,7 +65,6 @@ public class GrassrootsPartyDevController {
* @author wangc
* @date 2020.08.19 11:02
**/
@ExternalAppRequestAuth
@PostMapping("branchbuildtrend")
public Result<BranchBuildTrendResultDTO> branchBuildTrend(@RequestBody BranchBuildTrendFormDTO param){
ValidatorUtils.validateEntity(param, BranchBuildTrendFormDTO.branchBuildTrendGroup.class);
@ -83,7 +79,6 @@ public class GrassrootsPartyDevController {
* @author wangc
* @date 2020.08.19 15:25
**/
@ExternalAppRequestAuth
@PostMapping("branchbuildrank")
public Result<BranchBuildRankResultDTO> branchBuildRank(@RequestBody BranchBuildRankFormDTO param){
ValidatorUtils.validateEntity(param, BranchBuildRankFormDTO.BranchBuildRankGroup.class);

19
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java

@ -1,8 +1,5 @@
package com.epmet.datareport.controller.screen;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.extappauth.annotation.InternalAppRequestAuth;
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.eum.OrgTypeEnum;
@ -10,10 +7,7 @@ import com.epmet.datareport.service.evaluationindex.screen.IndexService;
import com.epmet.evaluationindex.screen.dto.form.*;
import com.epmet.evaluationindex.screen.dto.result.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -36,7 +30,6 @@ public class IndexController {
* @author zxc
* @date 2020/8/19 2:53 下午
*/
@ExternalAppRequestAuth
@PostMapping("yearaverageindex")
public Result<YearAverageIndexResultDTO> yearAverageIndex(@RequestBody YearAverageIndexFormDTO yearAverageIndexFormDTO){
ValidatorUtils.validateEntity(yearAverageIndexFormDTO, YearAverageIndexFormDTO.YearAverageIndex.class);
@ -49,7 +42,6 @@ public class IndexController {
* @author zxc
* @date 2020/8/19 3:17 下午
*/
@ExternalAppRequestAuth
@PostMapping("monthindexanalysis/piechart")
public Result<MonthPieChartResultDTO> monthPieChart(@RequestBody MonthPieChartFormDTO monthPieChartFormDTO){
ValidatorUtils.validateEntity(monthPieChartFormDTO, MonthPieChartFormDTO.MonthPieChart.class);
@ -62,7 +54,6 @@ public class IndexController {
* @author zxc
* @date 2020/8/19 5:27 下午
*/
@ExternalAppRequestAuth
@PostMapping("monthindexanalysis/barchart")
public Result<MonthBarchartResultDTO> monthBarchart(@RequestBody MonthBarchartFormDTO monthBarchartFormDTO){
ValidatorUtils.validateEntity(monthBarchartFormDTO, MonthBarchartFormDTO.MonthBarchart.class);
@ -75,7 +66,6 @@ public class IndexController {
* @author zxc
* @date 2020/8/20 10:02 上午
*/
@ExternalAppRequestAuth
@PostMapping("subagencyindexrank")
public Result<List<SubAgencyIndexRankResultDTO>> subAgencyIndexRank(@RequestBody SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO){
ValidatorUtils.validateEntity(subAgencyIndexRankFormDTO, SubAgencyIndexRankFormDTO.SubAgencyIndexRank.class);
@ -90,8 +80,6 @@ public class IndexController {
* @Author zhangyong
* @Date 13:39 2020-09-11
**/
@InternalAppRequestAuth
@ExternalAppRequestAuth
@PostMapping("dataclient/subagencyindexrank")
public Result<List<AnNingSubAgencyIndexRankResultDTO>> getSubAgencyIndexRank(@RequestBody SubAgencyIndexRankYMFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, SubAgencyIndexRankYMFormDTO.SubAgencyIndexRank.class);
@ -104,10 +92,9 @@ public class IndexController {
* @author jianjun.liu
* @date 2020/8/20 10:02 上午
*/
@ExternalAppRequestAuth
@PostMapping("gridindexrank")
public Result<List<SubAgencyIndexRankResultDTO>> gridIndexRank(ExternalAppRequestParam extParam, @RequestBody GridIndexRankFormDTO formDTO) {
formDTO.setCustomerId(extParam.getCustomerId());
public Result<List<SubAgencyIndexRankResultDTO>> gridIndexRank(@RequestHeader("CustomerId") String customerId, @RequestBody GridIndexRankFormDTO formDTO) {
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO);
formDTO.setOrgType(OrgTypeEnum.GRID.getCode());
return new Result<List<SubAgencyIndexRankResultDTO>>().ok(indexService.selectIndexRankByOrgType(formDTO));

177
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/KcScreenController.java

@ -1,8 +1,5 @@
package com.epmet.datareport.controller.screen;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.extappauth.annotation.InternalAppRequestAuth;
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.service.evaluationindex.screen.KcScreenService;
@ -17,10 +14,7 @@ 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;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -39,47 +33,37 @@ public class KcScreenController {
/**
* @param externalAppRequestParam
* @Description 首页-平台各类总数
* @author sun
*/
@ExternalAppRequestAuth
@PostMapping("homepage/summary")
public Result<HomepageSummaryResultDTO> homepageSummary(ExternalAppRequestParam externalAppRequestParam){
return new Result<HomepageSummaryResultDTO>().ok(kcScreenService.homepageSummary(externalAppRequestParam));
public Result<HomepageSummaryResultDTO> homepageSummary(@RequestHeader("CustomerId") String customerId){
return new Result<HomepageSummaryResultDTO>().ok(kcScreenService.homepageSummary(customerId));
}
/**
* @param externalAppRequestParam
* @Description 公益互助-各类总数汇总
* @author sun
*/
@ExternalAppRequestAuth
@PostMapping("heart/summary")
public Result<HeartSummaryResultDTO> heartSummary(ExternalAppRequestParam externalAppRequestParam){
return new Result<HeartSummaryResultDTO>().ok(kcScreenService.heartSummary(externalAppRequestParam));
public Result<HeartSummaryResultDTO> heartSummary(@RequestHeader("CustomerId") String customerId){
return new Result<HeartSummaryResultDTO>().ok(kcScreenService.heartSummary(customerId));
}
/**
* @param externalAppRequestParam
* @Description 公益互助-公益活动次数
* @author sun
*/
@ExternalAppRequestAuth
@PostMapping("heart/actcounttrend")
public Result<HeartActcounttrendResultDTO> heartActcounttrend(ExternalAppRequestParam externalAppRequestParam){
return new Result<HeartActcounttrendResultDTO>().ok(kcScreenService.heartActcounttrend(externalAppRequestParam));
public Result<HeartActcounttrendResultDTO> heartActcounttrend(@RequestHeader("CustomerId") String customerId){
return new Result<HeartActcounttrendResultDTO>().ok(kcScreenService.heartActcounttrend(customerId));
}
/**
* 议题分析-各类总数
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@InternalAppRequestAuth
@PostMapping("issue/summary")
public Result getIssueSummary(ExternalAppRequestParam externalAppRequestParam) {
String customerId = externalAppRequestParam.getCustomerId();
public Result getIssueSummary(@RequestHeader("CustomerId") String customerId) {
//String customerId = "b09527201c4409e19d1dbc5e3c3429a1";
KcIssueSummary issueSummary = kcScreenService.getIssueSummary(customerId);
return new Result().ok(issueSummary);
@ -87,326 +71,247 @@ public class KcScreenController {
/**
* 参与趋势
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("issue/partitrend")
public Result getIssuePartiTrend(ExternalAppRequestParam externalAppRequestParam) {
String customerId = externalAppRequestParam.getCustomerId();
//String customerId = "b09527201c4409e19d1dbc5e3c3429a1";
public Result getIssuePartiTrend(@RequestHeader("CustomerId") String customerId) {
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";
public Result getIssueGridTotalRank(@RequestHeader("CustomerId") String customerId) {
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";
public Result getAvgAuditTimeRank(@RequestHeader("CustomerId") String customerId) {
return new Result().ok(kcScreenService.getAvgAuditTimeRank(customerId));
}
/**
* 议题分析-议题效率
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("issue/effective")
public Result getIssueEffective(ExternalAppRequestParam externalAppRequestParam) {
String customerId = externalAppRequestParam.getCustomerId();
public Result getIssueEffective(@RequestHeader("CustomerId") String customerId) {
//String customerId = "2fe0065f70ca0e23ce4c26fca5f1d933";
return new Result().ok(kcScreenService.getIssueEffective(customerId));
}
/**
* @param externalAppRequestParam
* @Description 公益互助-志愿者画像
* @author sun
*/
@ExternalAppRequestAuth
@PostMapping("heart/volunteerportrayal")
public Result<HeartVolunteerportrayalResultDTO> heartVolunteerportrayal(ExternalAppRequestParam externalAppRequestParam){
return new Result<HeartVolunteerportrayalResultDTO>().ok(kcScreenService.heartVolunteerportrayal(externalAppRequestParam));
public Result<HeartVolunteerportrayalResultDTO> heartVolunteerportrayal(@RequestHeader("CustomerId") String customerId){
return new Result<HeartVolunteerportrayalResultDTO>().ok(kcScreenService.heartVolunteerportrayal(customerId));
}
/**
* @param externalAppRequestParam
* @Description 公益互助-个人志愿者公益时长排名
* @author sun
*/
@ExternalAppRequestAuth
@PostMapping("heart/volunteerrank")
public Result<List<HeartVolunteerrankResultDTO>> heartVolunteerrank(ExternalAppRequestParam externalAppRequestParam, @RequestBody HeartVolunteerrankFormDTO formDTO){
public Result<List<HeartVolunteerrankResultDTO>> heartVolunteerrank(@RequestHeader("CustomerId") String customerId, @RequestBody HeartVolunteerrankFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, HeartVolunteerrankFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(externalAppRequestParam.getCustomerId());
formDTO.setCustomerId(customerId);
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));
public Result<GroupSummaryResultDTO> groupSummary(@RequestHeader("CustomerId") String customerId){
return new Result<GroupSummaryResultDTO>().ok(kcScreenService.groupSummary(customerId));
}
/**
* @param externalAppRequestParam
* @Description 邻里党群-话题参与趋势
* @author sun
*/
@ExternalAppRequestAuth
@PostMapping("group/partitopictrend")
public Result<GroupPartitopictrendResultDTO> groupPartitopictrend(ExternalAppRequestParam externalAppRequestParam){
return new Result<GroupPartitopictrendResultDTO>().ok(kcScreenService.groupPartitopictrend(externalAppRequestParam));
public Result<GroupPartitopictrendResultDTO> groupPartitopictrend(@RequestHeader("CustomerId") String customerId){
return new Result<GroupPartitopictrendResultDTO>().ok(kcScreenService.groupPartitopictrend(customerId));
}
/**
* @param externalAppRequestParam
* @Description 邻里党群-社群数量排名
* @author sun
*/
@ExternalAppRequestAuth
@PostMapping("group/gridgroupcountrank")
public Result<GroupGridgroupcountrankResultDTO> groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam){
return new Result<GroupGridgroupcountrankResultDTO>().ok(kcScreenService.groupGridgroupcountrank(externalAppRequestParam));
public Result<GroupGridgroupcountrankResultDTO> groupGridgroupcountrank(@RequestHeader("CustomerId") String customerId){
return new Result<GroupGridgroupcountrankResultDTO>().ok(kcScreenService.groupGridgroupcountrank(customerId));
}
/**
* @param externalAppRequestParam
* @Description 邻里党群-社群数量排名
* @author sun
*/
@ExternalAppRequestAuth
@PostMapping("group/usercountrank")
public Result<List<GroupUserCountRankResultDTO>> groupUserCountRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody GroupUserCountRankFormDTO formDTO){
public Result<List<GroupUserCountRankResultDTO>> groupUserCountRank(@RequestHeader("CustomerId") String customerId, @RequestBody GroupUserCountRankFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, GroupUserCountRankFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(externalAppRequestParam.getCustomerId());
formDTO.setCustomerId(customerId);
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){
public Result<List<GroupTopicShiftIssueRatioRankResultDTO>> groupTopicShiftIssueRatioRank(@RequestHeader("CustomerId") String customerId, @RequestBody GroupTopicShiftIssueRatioRankFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, GroupTopicShiftIssueRatioRankFormDTO.AddUserInternalGroup.class);
formDTO.setCustomerId(externalAppRequestParam.getCustomerId());
formDTO.setCustomerId(customerId);
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();
public Result<ProjectSummaryResultDTO> getProjectSummary(@RequestHeader("CustomerId") String customerId){
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();
public Result<GridProjectCountRankResultDTO> getProjectGridCountRank(@RequestHeader("CustomerId") String customerId){
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();
public Result<List<ProjectCategoryAnalysisResultDTO>> getProjectCategoryAnalysis(@RequestHeader("CustomerId") String customerId){
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();
public Result<List<ProjectAvgClosedTimeResultDTO>> getGridProjectAvgClosedTimeAnalysis(@RequestHeader("CustomerId") String customerId){
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();
public Result<ProjectSatisfactionResultDTO> getProjectSatisfactionAnalyze(@RequestHeader("CustomerId") String customerId){
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";
public Result<UserSummaryResultDTO> getUserSummary(@RequestHeader("CustomerId") String customerId){
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();
public Result<KcUserTrendResultDTO> getUserTrend(@RequestHeader("CustomerId") String customerId){
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();
public Result<KcUserRankResultDTO> getUserRank(@RequestHeader("CustomerId") String customerId){
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();
public Result<KcUserPortrayalResultDTO> getUserPortrayal(@RequestHeader("CustomerId") String customerId){
return new Result<KcUserPortrayalResultDTO>().ok(kcScreenService.getUserPortrayal(customerId));
}
/**
* 用户积分排名
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("user/pointsrank")
public Result<KcUserPointRankResultDTO> getUserPointsRank(ExternalAppRequestParam externalAppRequestParam,
public Result<KcUserPointRankResultDTO> getUserPointsRank(@RequestHeader("CustomerId") String customerId,
@RequestBody PageFormDTO form) {
String customerId = externalAppRequestParam.getCustomerId();
return new Result<KcUserPointRankResultDTO>().ok(kcScreenService.getUserPointsRank(customerId, form.getPageNo(), form.getPageSize()));
}
/**
* 党建声音-各类总数
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("news/summary")
public Result<ScreenKcNewsSummaryResultDTO> getNewsSummary(ExternalAppRequestParam externalAppRequestParam){
String customerId = externalAppRequestParam.getCustomerId();
public Result<ScreenKcNewsSummaryResultDTO> getNewsSummary(@RequestHeader("CustomerId") String customerId){
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();
public Result<ScreenKcNewsPartiTrendResultDTO> getNewsPartiTrend(@RequestHeader("CustomerId") String customerId){
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();
public Result<List<ScreenKcCategoryNewsCountResultDTO>> getNewsCountGroupByCategory(@RequestHeader("CustomerId") String customerId){
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();
public Result<ScreenKcCategoryNewsRankResultDTO> getNewsPartiCategoryRank(@RequestHeader("CustomerId") String customerId){
return new Result<ScreenKcCategoryNewsRankResultDTO>().ok(kcScreenService.getNewsPartiCategoryRank(customerId));
}
/**
* 党建声音-热点新闻排行
* @param externalAppRequestParam
* @return
*/
@ExternalAppRequestAuth
@PostMapping("news/hotrank")
public Result<List<ScreenKcNewsHotRankResultDTO>> listNewsHotRank(ExternalAppRequestParam externalAppRequestParam,
public Result<List<ScreenKcNewsHotRankResultDTO>> listNewsHotRank(@RequestHeader("CustomerId") String customerId,
@RequestBody PageFormDTO form){
String customerId = externalAppRequestParam.getCustomerId();
return new Result<List<ScreenKcNewsHotRankResultDTO>>().ok(kcScreenService.getNewsHotRank(customerId, form.getPageNo(), form.getPageSize()));
}

6
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java

@ -1,6 +1,5 @@
package com.epmet.datareport.controller.screen;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.PartyMemberLeadService;
@ -33,7 +32,6 @@ public class PartyMemberLeadController {
* @author zxc
* @date 2020/8/20 1:56 下午
*/
@ExternalAppRequestAuth
@PostMapping("fineexample")
public Result<FineExampleResultDTO> fineExample(@RequestBody FineExampleFormDTO fineExampleFormDTO){
ValidatorUtils.validateEntity(fineExampleFormDTO, FineExampleFormDTO.FineExample.class);
@ -46,7 +44,6 @@ public class PartyMemberLeadController {
* @author zxc
* @date 2020/8/20 2:35 下午
*/
@ExternalAppRequestAuth
@PostMapping("contactmasslinechart")
public Result<ContactMassLineChartResultDTO> contactMassLineChart(@RequestBody ContactMassLineChartFormDTO contactMassLineChartFormDTO){
ValidatorUtils.validateEntity(contactMassLineChartFormDTO, ContactMassLineChartFormDTO.ContactMassLineChart.class);
@ -59,7 +56,6 @@ public class PartyMemberLeadController {
* @author zxc
* @date 2020/8/20 3:19 下午
*/
@ExternalAppRequestAuth
@PostMapping("volunteerservice")
public Result<VolunteerServiceResultDTO> volunteerService(@RequestBody VolunteerServiceFormDTO volunteerServiceFormDTO){
ValidatorUtils.validateEntity(volunteerServiceFormDTO, VolunteerServiceFormDTO.VolunteerService.class);
@ -74,7 +70,6 @@ public class PartyMemberLeadController {
* @author wangc
* @date 2020.08.21 11:05
**/
@ExternalAppRequestAuth
@PostMapping("advancedbranchrank")
Result<List<AdvanceBranchRankResultDTO>> advancedBranchRank(@RequestBody AgencyAndNumFormDTO param){
ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class);
@ -89,7 +84,6 @@ public class PartyMemberLeadController {
* @author wangc
* @date 2020.08.21 14:22
**/
@ExternalAppRequestAuth
@PostMapping("advancedpartymemberrank")
Result<List<PartyUserPointResultDTO>> advancedPartymemberRank(@RequestBody AgencyAndNumFormDTO param){
ValidatorUtils.validateEntity(param, AgencyFormDTO.CommonAgencyIdGroup.class);

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java

@ -1,6 +1,5 @@
package com.epmet.datareport.controller.screen;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectService;
@ -31,7 +30,6 @@ public class ScreenProjectController {
* @author zxc
* @date 2020/8/19 4:36 下午
*/
@ExternalAppRequestAuth
@PostMapping("detail")
public Result<ProjectDetailResultDTO> projectDetail(@RequestBody ProjectDetailFormDTO projectDetailFormDTO){
ValidatorUtils.validateEntity(projectDetailFormDTO, ProjectDetailFormDTO.ProjectDetail.class);

56
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenUserController.java

@ -0,0 +1,56 @@
package com.epmet.datareport.controller.screen;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.ScreenUserService;
import com.epmet.evaluationindex.screen.dto.form.PartIndexScroeRankFormDTO;
import com.epmet.evaluationindex.screen.dto.form.UserPointRankFormDTO;
import com.epmet.evaluationindex.screen.dto.result.PartIndexScroeRankResultDTO;
import com.epmet.evaluationindex.screen.dto.result.UserPointRankListResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 数据改版api
*
* @author sun
*/
@RestController
@RequestMapping("/screen/user")
public class ScreenUserController {
@Autowired
private ScreenUserService screenUserService;
/**
* @param tokenDTO
* @Description 热心市民积分排行列表
* @author sun
*/
@PostMapping("userpointrank")
public Result<List<UserPointRankListResultDTO>> userPointRank(@LoginUser TokenDto tokenDTO, @RequestBody UserPointRankFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, UserPointRankFormDTO.AddUserInternalGroup.class);
return new Result<List<UserPointRankListResultDTO>>().ok(screenUserService.userPointRank(formDTO));
}
/**
* @param tokenDTO
* @Description 党员指标得分排行
* @author sun
*/
@PostMapping("partindexscroerank")
public Result<List<PartIndexScroeRankResultDTO>> partIndexScroeRank(@LoginUser TokenDto tokenDTO, @RequestBody PartIndexScroeRankFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, PartIndexScroeRankFormDTO.AddUserInternalGroup.class);
return new Result<List<PartIndexScroeRankResultDTO>>().ok(screenUserService.partIndexScroeRank(formDTO));
}
}

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java

@ -80,7 +80,7 @@ public interface ScreenIndexDataMonthlyDao{
/**
* @param formDTO
* @Description 同级对比--根据组织Id的上级组织Id查询同级组织对应类型的得分排名查询最近一个月数据
* @Description 同级对比--根据组织或网格Id的上级组织Id查询同级组织或网格对应类型的得分排名查询最近一个月数据
* @author sun
*/
List<PeerComparisonResultDTO> selectScoreList(PeerComparisonFormDTO formDTO);

18
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java

@ -18,7 +18,11 @@
package com.epmet.datareport.dao.evaluationindex.screen;
import com.epmet.dto.result.user.KcUserPointRankResultDTO;
import com.epmet.evaluationindex.screen.dto.form.PartIndexScroeRankFormDTO;
import com.epmet.evaluationindex.screen.dto.form.UserPointRankFormDTO;
import com.epmet.evaluationindex.screen.dto.result.PartIndexScroeRankResultDTO;
import com.epmet.evaluationindex.screen.dto.result.PartyUserPointResultDTO;
import com.epmet.evaluationindex.screen.dto.result.UserPointRankListResultDTO;
import com.epmet.evaluationindex.screen.dto.result.UserPointResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -53,4 +57,18 @@ public interface ScreenPartyUserRankDataDao{
List<PartyUserPointResultDTO> selectPartymemberPointOrder(@Param("agencyId")String agencyId);
List<KcUserPointRankResultDTO.KcUserPoint> listUserPoints(String customerId);
/**
* @param formDTO
* @Description 查询组织下居民积分排行按积分值降序
* @author sun
*/
List<UserPointRankListResultDTO> selectAgencyUserPointList(UserPointRankFormDTO formDTO);
/**
* @param formDTO
* @Description 查询组织下党员的积分排行按积分值降序
* @author sun
*/
List<PartIndexScroeRankResultDTO> selectPartymemberPointList(PartIndexScroeRankFormDTO formDTO);
}

13
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexAgencyScoreDao.java

@ -18,8 +18,10 @@
package com.epmet.datareport.dao.fact;
import com.epmet.evaluationindex.screen.dto.form.AblityIndexFormDTO;
import com.epmet.evaluationindex.screen.dto.form.MonthScoreListFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ScoreListFormDTO;
import com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO;
import com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO;
import com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO;
import org.apache.ibatis.annotations.Mapper;
@ -34,17 +36,24 @@ import java.util.LinkedList;
@Mapper
public interface FactIndexAgencyScoreDao {
/**
* @param formDTO
* @Description 分别查询区县乡镇街道过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun
*/
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectAblityIndex(AblityIndexFormDTO formDTO);
/**
* @param formDTO
* @Description 分别查询当前组织某一月份党建能力治理能力服务能力对应的总分本级分下级分
* @author sun
*/
ScoreListResultDTO selectScore(ScoreListFormDTO formDTO);
ScoreListResultDTO selectScoreList(ScoreListFormDTO formDTO);
/**
* @param formDTO
* @Description 分别查询区县乡镇街道过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun
*/
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectAblityIndex(AblityIndexFormDTO formDTO);
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectMonthScoreList(MonthScoreListFormDTO formDTO);
}

18
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexCommunityScoreDao.java

@ -18,7 +18,11 @@
package com.epmet.datareport.dao.fact;
import com.epmet.evaluationindex.screen.dto.form.AblityIndexFormDTO;
import com.epmet.evaluationindex.screen.dto.form.MonthScoreListFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ScoreListFormDTO;
import com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO;
import com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO;
import com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.LinkedList;
@ -38,4 +42,18 @@ public interface FactIndexCommunityScoreDao {
* @author sun
*/
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectCommunityAblityIndex(AblityIndexFormDTO formDTO);
/**
* @param formDTO
* @Description 分别查询社区级组织某一月份党建能力治理能力服务能力对应的总分本级分下级分
* @author sun
*/
ScoreListResultDTO selectCommunityScoreList(ScoreListFormDTO formDTO);
/**
* @param formDTO
* @Description 分别查询社区过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun
*/
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectCommunityMonthScoreList(MonthScoreListFormDTO formDTO);
}

28
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridScoreDao.java

@ -17,8 +17,16 @@
package com.epmet.datareport.dao.fact;
import com.epmet.evaluationindex.screen.dto.form.AblityIndexFormDTO;
import com.epmet.evaluationindex.screen.dto.form.MonthScoreListFormDTO;
import com.epmet.evaluationindex.screen.dto.form.ScoreListFormDTO;
import com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO;
import com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO;
import com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.LinkedList;
/**
* 网格相关分值记录表
*
@ -28,4 +36,24 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface FactIndexGridScoreDao {
/**
* @param formDTO
* @Description 分别查网格过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun
*/
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectGridAblityIndex(AblityIndexFormDTO formDTO);
/**
* @param formDTO
* @Description 分别查网格某一月份党建能力治理能力服务能力对应的总分本级分下级分
* @author sun
*/
ScoreListResultDTO selectGridScoreList(ScoreListFormDTO formDTO);
/**
* @param formDTO
* @Description 分别查网格过去12个月党建能力治理能力服务能力每月总分本级得分下级得分数据
* @author sun
*/
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectGridMonthScoreList(MonthScoreListFormDTO formDTO);
}

20
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/fact/FactIndexGridSubScoreDao.java

@ -17,8 +17,15 @@
package com.epmet.datareport.dao.fact;
import com.epmet.evaluationindex.screen.dto.form.AblityListFormDTO;
import com.epmet.evaluationindex.screen.dto.form.MonthAblityListFormDTO;
import com.epmet.evaluationindex.screen.dto.result.AblityListResultDTO;
import com.epmet.evaluationindex.screen.dto.result.MonthAblityListResultDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.LinkedList;
import java.util.List;
/**
* 网格相关分值记录表
*
@ -28,4 +35,17 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface FactIndexGridSubScoreDao {
/**
* @param formDTO
* @Description 查询网格某月份某项能力对应的各项指标
* @author sun
*/
List<AblityListResultDTO> selectGridAblityList(AblityListFormDTO formDTO);
/**
* @param formDTO
* @Description 查询网格层级某项能力对应的一项指标过去12个月份数据
* @author sun
*/
LinkedList<MonthAblityListResultDTO> selectGridMonthAblityList(MonthAblityListFormDTO formDTO);
}

5
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java

@ -1,6 +1,5 @@
package com.epmet.datareport.service.evaluationindex.screen;
import com.epmet.commons.extappauth.bean.ExternalAppRequestParam;
import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO;
import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO;
@ -14,12 +13,12 @@ import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO;
public interface AgencyService {
/**
* @Description 1组织机构树
* @param
* @Description 1组织机构树 只返回 is_display = '1'
* @author zxc
* @date 2020/8/18 2:04 下午
*/
TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam);
TreeResultDTO tree(String customerId);
/**
* @Description 2组织区域查询

22
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/KcScreenService.java

@ -1,6 +1,5 @@
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.*;
@ -22,32 +21,28 @@ import com.epmet.evaluationindex.screen.dto.result.HomepageSummaryResultDTO;
public interface KcScreenService {
/**
* @param externalAppRequestParam
* @Description 首页-平台各类总数
* @author sun
*/
HomepageSummaryResultDTO homepageSummary(ExternalAppRequestParam externalAppRequestParam);
HomepageSummaryResultDTO homepageSummary(String customerId);
/**
* @param externalAppRequestParam
* @Description 公益互助-各类总数汇总
* @author sun
*/
HeartSummaryResultDTO heartSummary(ExternalAppRequestParam externalAppRequestParam);
HeartSummaryResultDTO heartSummary(String customerId);
/**
* @param externalAppRequestParam
* @Description 公益互助-公益活动次数
* @author sun
*/
HeartActcounttrendResultDTO heartActcounttrend(ExternalAppRequestParam externalAppRequestParam);
HeartActcounttrendResultDTO heartActcounttrend(String customerId);
/**
* @param externalAppRequestParam
* @Description 公益互助-志愿者画像
* @author sun
*/
HeartVolunteerportrayalResultDTO heartVolunteerportrayal(ExternalAppRequestParam externalAppRequestParam);
HeartVolunteerportrayalResultDTO heartVolunteerportrayal(String customerId);
/**
* @param formDTO
@ -67,25 +62,22 @@ public interface KcScreenService {
/**
* @param externalAppRequestParam
* @Description 邻里党群-各类总数
* @author sun
*/
GroupSummaryResultDTO groupSummary(ExternalAppRequestParam externalAppRequestParam);
GroupSummaryResultDTO groupSummary(String customerId);
/**
* @param externalAppRequestParam
* @Description 邻里党群-话题参与趋势
* @author sun
*/
GroupPartitopictrendResultDTO groupPartitopictrend(ExternalAppRequestParam externalAppRequestParam);
GroupPartitopictrendResultDTO groupPartitopictrend(String customerId);
/**
* @param externalAppRequestParam
* @Description 邻里党群-社群数量排名
* @author sun
*/
GroupGridgroupcountrankResultDTO groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam);
GroupGridgroupcountrankResultDTO groupGridgroupcountrank(String customerId);
/**
* @param formDTO

30
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenUserService.java

@ -0,0 +1,30 @@
package com.epmet.datareport.service.evaluationindex.screen;
import com.epmet.evaluationindex.screen.dto.form.PartIndexScroeRankFormDTO;
import com.epmet.evaluationindex.screen.dto.form.UserPointRankFormDTO;
import com.epmet.evaluationindex.screen.dto.result.PartIndexScroeRankResultDTO;
import com.epmet.evaluationindex.screen.dto.result.UserPointRankListResultDTO;
import java.util.List;
/**
* 数据改版
*
* @author sun
*/
public interface ScreenUserService {
/**
* @param formDTO
* @Description 热心市民积分排行列表
* @author sun
*/
List<UserPointRankListResultDTO> userPointRank(UserPointRankFormDTO formDTO);
/**
* @param formDTO
* @Description 党员指标得分排行
* @author sun
*/
List<PartIndexScroeRankResultDTO> partIndexScroeRank(PartIndexScroeRankFormDTO formDTO);
}

10
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java

@ -1,7 +1,6 @@
package com.epmet.datareport.service.evaluationindex.screen.impl;
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.commons.tools.exception.RenException;
import com.epmet.constant.DataSourceConstant;
@ -13,7 +12,6 @@ import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
import com.epmet.evaluationindex.screen.dto.result.AgencyDistributionResultDTO;
import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO;
import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.exceptions.TooManyResultsException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -44,15 +42,9 @@ public class AgencyServiceImpl implements AgencyService {
*/
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam) {
public TreeResultDTO tree(String customerId) {
// 1. 查询客户根组织ID
String customerId = externalAppRequestParam.getCustomerId();
// 验签关闭,customerId无法获取,暂时写死
if (StringUtils.isBlank(customerId)) {
customerId = "b09527201c4409e19d1dbc5e3c3429a1";
}
TreeResultDTO rootAgency = null;
try {
rootAgency = screenCustomerAgencyDao.selectRootAgencyId(customerId);

36
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/KcScreenServiceImpl.java

@ -1,7 +1,6 @@
package com.epmet.datareport.service.evaluationindex.screen.impl;
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;
@ -99,37 +98,34 @@ public class KcScreenServiceImpl implements KcScreenService {
private ScreenKcNewsRankDao screenKcNewsRankDao;
/**
* @param externalAppRequestParam
* @Description 首页-平台各类总数
* @author sun
*/
@Override
public HomepageSummaryResultDTO homepageSummary(ExternalAppRequestParam externalAppRequestParam) {
return screenKcPlatformSummaryDailyDao.selectSummaryDaily(externalAppRequestParam.getCustomerId());
public HomepageSummaryResultDTO homepageSummary(String customerId) {
return screenKcPlatformSummaryDailyDao.selectSummaryDaily(customerId);
}
/**
* @param externalAppRequestParam
* @Description 公益互助-各类总数汇总
* @author sun
*/
@Override
public HeartSummaryResultDTO heartSummary(ExternalAppRequestParam externalAppRequestParam) {
return screenKcActSummaryDailyDao.selectHeartSummary(externalAppRequestParam.getCustomerId());
public HeartSummaryResultDTO heartSummary(String customerId) {
return screenKcActSummaryDailyDao.selectHeartSummary(customerId);
}
/**
* @param externalAppRequestParam
* @Description 公益互助-公益活动次数
* @author sun
*/
@Override
public HeartActcounttrendResultDTO heartActcounttrend(ExternalAppRequestParam externalAppRequestParam) {
public HeartActcounttrendResultDTO heartActcounttrend(String customerId) {
HeartActcounttrendResultDTO resultDTO = new HeartActcounttrendResultDTO();
LinkedList<String> xAxis = new LinkedList<>();
LinkedList<String> actCountDataList = new LinkedList<>();
//1.按客户查询最近十二个月数据
List<ActTrendMonthlyResultDTO> list = screenKcActTrendMonthlyDao.selectActTrendMonthly(externalAppRequestParam.getCustomerId());
List<ActTrendMonthlyResultDTO> list = screenKcActTrendMonthlyDao.selectActTrendMonthly(customerId);
//2.倒序遍历封装数据
for (int i = list.size() - 1; i >= 0; i--) {
xAxis.add(list.get(i).getMonthId());
@ -142,16 +138,15 @@ public class KcScreenServiceImpl implements KcScreenService {
}
/**
* @param externalAppRequestParam
* @Description 公益互助-志愿者画像
* @author sun
*/
@Override
public HeartVolunteerportrayalResultDTO heartVolunteerportrayal(ExternalAppRequestParam externalAppRequestParam) {
public HeartVolunteerportrayalResultDTO heartVolunteerportrayal(String customerId) {
HeartVolunteerportrayalResultDTO resultDTO = new HeartVolunteerportrayalResultDTO();
GenderDistributionResultDTO genderDistribution = new GenderDistributionResultDTO();
//1.根据客户Id查询最近日期志愿者统计数据
AgeDistributionResultDTO ageDistribution = screenKcVolunteerSummaryDailyDao.selectVolunteerSummaryDaily(externalAppRequestParam.getCustomerId());
AgeDistributionResultDTO ageDistribution = screenKcVolunteerSummaryDailyDao.selectVolunteerSummaryDaily(customerId);
//2.封装数据并返回
if (null == ageDistribution) {
resultDTO.setAgeDistribution(new AgeDistributionResultDTO());
@ -219,14 +214,13 @@ public class KcScreenServiceImpl implements KcScreenService {
}
/**
* @param externalAppRequestParam
* @Description 邻里党群-各类总数
* @author sun
*/
@Override
public GroupSummaryResultDTO groupSummary(ExternalAppRequestParam externalAppRequestParam) {
public GroupSummaryResultDTO groupSummary(String customerId) {
//1.按客户查询最近一天各网格各项数据的汇总值
GroupSummaryResultDTO resultDTO = screenKcGroupSummaryGridDailyDao.selectGroupSummaryDaily(externalAppRequestParam.getCustomerId());
GroupSummaryResultDTO resultDTO = screenKcGroupSummaryGridDailyDao.selectGroupSummaryDaily(customerId);
if (null == resultDTO) {
return new GroupSummaryResultDTO();
}
@ -246,17 +240,16 @@ public class KcScreenServiceImpl implements KcScreenService {
}
/**
* @param externalAppRequestParam
* @Description 邻里党群-话题参与趋势
* @author sun
*/
@Override
public GroupPartitopictrendResultDTO groupPartitopictrend(ExternalAppRequestParam externalAppRequestParam) {
public GroupPartitopictrendResultDTO groupPartitopictrend(String customerId) {
GroupPartitopictrendResultDTO resultDTO = new GroupPartitopictrendResultDTO();
LinkedList<String> xAxis = new LinkedList<>();
LinkedList<Integer> actCountDataList = new LinkedList<>();
//1.按客户查询最近十二个月所有网格汇总数据
List<KcTopicTrendGridMonthlyResultDTO> list = screenKcTopicTrendGridMonthlyDao.selectActTrendMonthly(externalAppRequestParam.getCustomerId());
List<KcTopicTrendGridMonthlyResultDTO> list = screenKcTopicTrendGridMonthlyDao.selectActTrendMonthly(customerId);
//2.倒序遍历封装数据
for (int i = list.size() - 1; i >= 0; i--) {
xAxis.add(list.get(i).getMonthId());
@ -269,17 +262,16 @@ public class KcScreenServiceImpl implements KcScreenService {
}
/**
* @param externalAppRequestParam
* @Description 邻里党群-社群数量排名
* @author sun
*/
@Override
public GroupGridgroupcountrankResultDTO groupGridgroupcountrank(ExternalAppRequestParam externalAppRequestParam) {
public GroupGridgroupcountrankResultDTO groupGridgroupcountrank(String customerId) {
GroupGridgroupcountrankResultDTO resultDTO = new GroupGridgroupcountrankResultDTO();
LinkedList<String> gridNameDataList = new LinkedList<>();
LinkedList<Integer> groupCountDataList = new LinkedList<>();
//1.按日期降序,查询客户最近一天所有网格数据,按每个网格的社区总数降序排列
LinkedList<GridNameGroupCountResultDTO> list = screenKcGroupSummaryGridDailyDao.selectGridDailyList(externalAppRequestParam.getCustomerId());
LinkedList<GridNameGroupCountResultDTO> list = screenKcGroupSummaryGridDailyDao.selectGridDailyList(customerId);
//2.封装数据
list.forEach(l -> {
gridNameDataList.add(l.getGridName());

61
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenUserServiceImpl.java

@ -0,0 +1,61 @@
package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.constant.FactConstant;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenEventDataDao;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenPartyUserRankDataDao;
import com.epmet.datareport.service.evaluationindex.screen.ScreenUserService;
import com.epmet.evaluationindex.screen.dto.form.PartIndexScroeRankFormDTO;
import com.epmet.evaluationindex.screen.dto.form.UserPointRankFormDTO;
import com.epmet.evaluationindex.screen.dto.result.PartIndexScroeRankResultDTO;
import com.epmet.evaluationindex.screen.dto.result.UserPointRankListResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 数据改版
*
* @author sun
*/
@Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class ScreenUserServiceImpl implements ScreenUserService {
@Autowired
private ScreenPartyUserRankDataDao screenPartyUserRankDataDao;
/**
* @param formDTO
* @Description 热心市民积分排行列表
* @author sun
*/
@Override
public List<UserPointRankListResultDTO> userPointRank(UserPointRankFormDTO formDTO) {
//1.参数校验
if (!FactConstant.AGENCY.equals(formDTO.getOrgType()) && !FactConstant.GRID.equals(formDTO.getOrgType())) {
throw new RenException(String.format("入参格式错误,错误的组织或网格类型:%s", formDTO.getOrgType()));
}
//2.查询组织下居民积分排行,按积分值降序 screen_party_user_rank_data
return screenPartyUserRankDataDao.selectAgencyUserPointList(formDTO);
}
/**
* @param formDTO
* @Description 党员指标得分排行
* @author sun
*/
@Override
public List<PartIndexScroeRankResultDTO> partIndexScroeRank(PartIndexScroeRankFormDTO formDTO) {
//1.参数校验
if (!FactConstant.AGENCY.equals(formDTO.getOrgType()) && !FactConstant.GRID.equals(formDTO.getOrgType())) {
throw new RenException(String.format("入参格式错误,错误的组织或网格类型:%s", formDTO.getOrgType()));
}
//2.查询组织下党员的积分排行 screen_party_user_rank_data
return screenPartyUserRankDataDao.selectPartymemberPointList(formDTO);
}
}

338
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/fact/impl/FactIndexServiceImpl.java

@ -7,16 +7,14 @@ import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.constant.FactConstant;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenIndexDataMonthlyDao;
import com.epmet.datareport.dao.fact.FactIndexAgencyScoreDao;
import com.epmet.datareport.dao.fact.FactIndexAgencySubScoreDao;
import com.epmet.datareport.dao.fact.FactIndexCommunityScoreDao;
import com.epmet.datareport.dao.fact.FactIndexCommunitySubScoreDao;
import com.epmet.datareport.dao.fact.*;
import com.epmet.datareport.service.fact.FactIndexService;
import com.epmet.evaluationindex.screen.dto.form.*;
import com.epmet.evaluationindex.screen.dto.result.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@ -45,6 +43,10 @@ public class FactIndexServiceImpl implements FactIndexService {
private FactIndexCommunityScoreDao factIndexCommunityScoreDao;
@Autowired
private FactIndexCommunitySubScoreDao factIndexCommunitySubScoreDao;
@Autowired
private FactIndexGridScoreDao factIndexGridScoreDao;
@Autowired
private FactIndexGridSubScoreDao factIndexGridSubScoreDao;
/**
* @param formDTO
@ -53,76 +55,91 @@ public class FactIndexServiceImpl implements FactIndexService {
*/
@Override
public List<AblityIndexResultDTO> ablityIndex(AblityIndexFormDTO formDTO) {
LinkedList<AblityIndexResultDTO> resultDTO = new LinkedList<>();
LinkedList<AblityIndexResultDTO> resultList = new LinkedList<>();
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> djList = null;
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> zlList = null;
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> fwList = null;
//分别查询过去12个月党建能力、治理能力、服务能力各自总分乘权重后的分值,每个月份三个分值的加和就是当月的能力指数的分值 fact_index_agency_score 按月份升序
//1.计算所查月份前12个月的monthId
formDTO.setStartMonthId(getDate(formDTO.getMonthId()));
//2.根据组织Id查询组织信息
CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getAgencyId());
if (null == agency) {
throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getAgencyId()));
}
//1.根据组织级别判断查询哪类数据表
//区县级、乡镇街道级
if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) {
//2-1.查询过去12个月党建能力每月总分、本级得分、下级得分数据(不想写union)
formDTO.setIndexCode(FactConstant.DJNL);
djList = factIndexAgencyScoreDao.selectAblityIndex(formDTO);
//2-2.查询过去12个月治理能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.ZLNL);
zlList = factIndexAgencyScoreDao.selectAblityIndex(formDTO);
//2-3.查询过去12个月服务能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.FWNL);
fwList = factIndexAgencyScoreDao.selectAblityIndex(formDTO);
//2.根据类型判断是查询组织数据还是网格数据
//组织层级数据
if (FactConstant.AGENCY.equals(formDTO.getOrgType())) {
//3.根据组织Id查询组织信息
CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId());
if (null == agency) {
throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId()));
}
//4.根据组织级别判断查询哪类数据表
//区县级、乡镇街道级
if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) {
//4-1.查询过去12个月党建能力每月总分、本级得分、下级得分数据(不想写union)
formDTO.setIndexCode(FactConstant.DJNL);
djList = factIndexAgencyScoreDao.selectAblityIndex(formDTO);
//4-2.查询过去12个月治理能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.ZLNL);
zlList = factIndexAgencyScoreDao.selectAblityIndex(formDTO);
//4-3.查询过去12个月服务能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.FWNL);
fwList = factIndexAgencyScoreDao.selectAblityIndex(formDTO);
//社区级
} else if ("community".equals(agency.getLevel())) {
//2-1.查询过去12个月党建能力每月总分、本级得分、下级得分数据
//社区级
} else if ("community".equals(agency.getLevel())) {
//4-1.查询过去12个月党建能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.DJNL);
djList = factIndexCommunityScoreDao.selectCommunityAblityIndex(formDTO);
//4-2.查询过去12个月治理能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.ZLNL);
zlList = factIndexCommunityScoreDao.selectCommunityAblityIndex(formDTO);
//4-3.查询过去12个月服务能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.FWNL);
fwList = factIndexCommunityScoreDao.selectCommunityAblityIndex(formDTO);
} else {
throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId()));
}
//网格层级数据
} else if (FactConstant.GRID.equals(formDTO.getOrgType())) {
//5.查询过去12个月网格层级各项能力对应的各项得分数据
//5-1.查询网格过去12个月党建能力每月总分、本级得分、下级得分数据(不想写union)
formDTO.setIndexCode(FactConstant.DJNL);
djList = factIndexCommunityScoreDao.selectCommunityAblityIndex(formDTO);
//2-2.查询过去12个月治理能力每月总分、本级得分、下级得分数据
djList = factIndexGridScoreDao.selectGridAblityIndex(formDTO);
//5-2.查询网格过去12个月治理能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.ZLNL);
zlList = factIndexCommunityScoreDao.selectCommunityAblityIndex(formDTO);
//2-3.查询过去12个月服务能力每月总分、本级得分、下级得分数据
zlList = factIndexGridScoreDao.selectGridAblityIndex(formDTO);
//5-3.查询网格过去12个月服务能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.FWNL);
fwList = factIndexCommunityScoreDao.selectCommunityAblityIndex(formDTO);
fwList = factIndexGridScoreDao.selectGridAblityIndex(formDTO);
} else {
throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getAgencyId()));
throw new RenException(String.format("能力指数查询,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType()));
}
//3.遍历计算每个月能力指数
//6.遍历计算每个月能力指数
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> nlList = new LinkedList<>();
for (int i = 0; i < djList.size(); i++) {
AblityIndexResultDTO.ScoreListResultDTO nldto = new AblityIndexResultDTO.ScoreListResultDTO();
nldto.setIndexTotal(djList.get(i).getIndexTotal() + zlList.get(i).getIndexTotal() + fwList.get(i).getIndexTotal());
nldto.setAgencyScore(djList.get(i).getAgencyScore() + zlList.get(i).getAgencyScore() + fwList.get(i).getAgencyScore());
nldto.setSubAgencyScore(djList.get(i).getSubAgencyScore() + zlList.get(i).getSubAgencyScore() + fwList.get(i).getSubAgencyScore());
double num1 = new BigDecimal((djList.get(i).getIndexTotal() + zlList.get(i).getIndexTotal() + fwList.get(i).getIndexTotal())).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue();
nldto.setIndexTotal(num1);
nldto.setMonthId(djList.get(i).getMonthId());
nlList.add(nldto);
}
//5.封装数据并返回
AblityIndexResultDTO nl = new AblityIndexResultDTO();
nl.setIndexCode(FactConstant.NLZB);
nl.setScoreList(djList);
resultDTO.add(nl);
nl.setScoreList(nlList);
if(null != nlList){resultList.add(nl);}
AblityIndexResultDTO dj = new AblityIndexResultDTO();
dj.setIndexCode(FactConstant.DJNL);
dj.setScoreList(djList);
resultDTO.add(dj);
if(null != djList){resultList.add(dj);}
AblityIndexResultDTO zl = new AblityIndexResultDTO();
zl.setIndexCode(FactConstant.ZLNL);
zl.setScoreList(djList);
resultDTO.add(zl);
zl.setScoreList(zlList);
if(null != zlList){resultList.add(zl);}
AblityIndexResultDTO fw = new AblityIndexResultDTO();
fw.setIndexCode(FactConstant.FWNL);
fw.setScoreList(djList);
resultDTO.add(fw);
fw.setScoreList(fwList);
if(null != fwList){resultList.add(fw);}
return resultDTO;
return resultList;
}
/**
@ -132,13 +149,65 @@ public class FactIndexServiceImpl implements FactIndexService {
*/
@Override
public List<ScoreListResultDTO> scoreList(ScoreListFormDTO formDTO) {
//1.查询当前组织某一月份党建能力对应的总分、本级分、下级分
formDTO.setIndexCode(FactConstant.DJNL);
ScoreListResultDTO dj = factIndexAgencyScoreDao.selectScore(formDTO);
//2.查询当前组织某一月份治理能力对应的总分、本级分、下级分
//3.查询当前组织某一月份服务能力对应的总分、本级分、下级分
LinkedList<ScoreListResultDTO> resultList = new LinkedList<>();
ScoreListResultDTO dj = new ScoreListResultDTO();
ScoreListResultDTO zl = new ScoreListResultDTO();
ScoreListResultDTO fw = new ScoreListResultDTO();
//1.根据类型判断是查询组织数据还是网格数据
//组织层级数据
if (FactConstant.AGENCY.equals(formDTO.getOrgType())) {
//2.根据组织Id查询组织信息
CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId());
if (null == agency) {
throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId()));
}
//3.根据组织级别判断查询哪类数据表
//区县级、乡镇街道级
if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) {
//3-1.查询当前组织某一月份党建能力对应的总分、本级分、下级分
formDTO.setIndexCode(FactConstant.DJNL);
dj = factIndexAgencyScoreDao.selectScoreList(formDTO);
//3-2.查询当前组织某一月份治理能力对应的总分、本级分、下级分
formDTO.setIndexCode(FactConstant.ZLNL);
zl = factIndexAgencyScoreDao.selectScoreList(formDTO);
//3-3.查询当前组织某一月份服务能力对应的总分、本级分、下级分
formDTO.setIndexCode(FactConstant.FWNL);
fw = factIndexAgencyScoreDao.selectScoreList(formDTO);
//社区级
} else if ("community".equals(agency.getLevel())) {
//3-1.查询当前组织某一月份党建能力对应的总分、本级分、下级分
formDTO.setIndexCode(FactConstant.DJNL);
dj = factIndexCommunityScoreDao.selectCommunityScoreList(formDTO);
//3-2.查询当前组织某一月份治理能力对应的总分、本级分、下级分
formDTO.setIndexCode(FactConstant.ZLNL);
zl = factIndexCommunityScoreDao.selectCommunityScoreList(formDTO);
//3-3.查询当前组织某一月份服务能力对应的总分、本级分、下级分
formDTO.setIndexCode(FactConstant.FWNL);
fw = factIndexCommunityScoreDao.selectCommunityScoreList(formDTO);
} else {
throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId()));
}
return null;
//4.网格层级数据
} else if (FactConstant.GRID.equals(formDTO.getOrgType())) {
//4-1.查询当前组织某一月份党建能力对应的总分、本级分、下级分
formDTO.setIndexCode(FactConstant.DJNL);
dj = factIndexGridScoreDao.selectGridScoreList(formDTO);
//4-2.查询当前组织某一月份治理能力对应的总分、本级分、下级分
formDTO.setIndexCode(FactConstant.ZLNL);
zl = factIndexGridScoreDao.selectGridScoreList(formDTO);
//4-3.查询当前组织某一月份服务能力对应的总分、本级分、下级分
formDTO.setIndexCode(FactConstant.FWNL);
fw = factIndexGridScoreDao.selectGridScoreList(formDTO);
} else {
throw new RenException(String.format("按月份查询各项能力分数,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType()));
}
//5.封装数据并返回
if(null != dj){resultList.add(dj);}
if(null != zl){resultList.add(zl);}
if(null != fw){resultList.add(fw);}
return resultList;
}
/**
@ -148,7 +217,78 @@ public class FactIndexServiceImpl implements FactIndexService {
*/
@Override
public List<MonthScoreListResultDTO> monthScoreList(MonthScoreListFormDTO formDTO) {
return null;
LinkedList<MonthScoreListResultDTO> resultList = new LinkedList<>();
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> djList = new LinkedList<>();
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> zlList = new LinkedList<>();
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> fwList = new LinkedList<>();
//1.计算所查月份前12个月的monthId
formDTO.setStartMonthId(getDate(formDTO.getMonthId()));
//2.根据类型判断是查询组织数据还是网格数据
//组织层级数据
if (FactConstant.AGENCY.equals(formDTO.getOrgType())) {
//3.根据组织Id查询组织信息
CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId());
if (null == agency) {
throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId()));
}
//4.根据组织级别判断查询哪类数据表
//区县级、乡镇街道级
if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) {
//4-1.查询过去12个月党建能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.DJNL);
djList = factIndexAgencyScoreDao.selectMonthScoreList(formDTO);
//4-2.查询过去12个月治理能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.ZLNL);
zlList = factIndexAgencyScoreDao.selectMonthScoreList(formDTO);
//4-3.查询过去12个月服务能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.FWNL);
fwList = factIndexAgencyScoreDao.selectMonthScoreList(formDTO);
//社区级
} else if ("community".equals(agency.getLevel())) {
//4-1.查询过去12个月党建能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.DJNL);
djList = factIndexCommunityScoreDao.selectCommunityMonthScoreList(formDTO);
//4-2.查询过去12个月治理能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.ZLNL);
zlList = factIndexCommunityScoreDao.selectCommunityMonthScoreList(formDTO);
//4-3.查询过去12个月服务能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.FWNL);
fwList = factIndexCommunityScoreDao.selectCommunityMonthScoreList(formDTO);
} else {
throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId()));
}
//网格层级数据
} else if (FactConstant.GRID.equals(formDTO.getOrgType())) {
//5.查询过去12个月网格层级各项能力对应的各项得分数据
//5-1.查询网格过去12个月党建能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.DJNL);
djList = factIndexGridScoreDao.selectGridMonthScoreList(formDTO);
//5-2.查询网格过去12个月治理能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.ZLNL);
zlList = factIndexGridScoreDao.selectGridMonthScoreList(formDTO);
//5-3.查询网格过去12个月服务能力每月总分、本级得分、下级得分数据
formDTO.setIndexCode(FactConstant.FWNL);
fwList = factIndexGridScoreDao.selectGridMonthScoreList(formDTO);
} else {
throw new RenException(String.format("能力指数查询,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType()));
}
//5.封装数据并返回
MonthScoreListResultDTO dj = new MonthScoreListResultDTO();
dj.setIndexCode(FactConstant.DJNL);
dj.setScoreList(djList);
if(null != djList){resultList.add(dj);}
MonthScoreListResultDTO zl = new MonthScoreListResultDTO();
zl.setIndexCode(FactConstant.ZLNL);
zl.setScoreList(zlList);
if(null != zlList){resultList.add(zl);}
MonthScoreListResultDTO fw = new MonthScoreListResultDTO();
fw.setIndexCode(FactConstant.FWNL);
fw.setScoreList(fwList);
if(null != fwList){resultList.add(fw);}
return resultList;
}
/**
@ -159,30 +299,41 @@ public class FactIndexServiceImpl implements FactIndexService {
@Override
public List<AblityListResultDTO> ablityList(AblityListFormDTO formDTO) {
List<AblityListResultDTO> resultList = new ArrayList<>();
//按月份查询当前组织各项指标数据 fact_index_agency_sub_score
//1.根据组织Id查询组织信息
CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getAgencyId());
if (null == agency) {
throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getAgencyId()));
}
//2.根据组织级别拼接查询条件,判断查询不同数据表
//区县级、乡镇街道级
if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) {
if ("district".equals(agency.getLevel())) {
formDTO.setAllParentIndexCode(FactConstant.QUAN_QU_XIANG_GUAN + ":" + formDTO.getIndexCode());
} else {
formDTO.setAllParentIndexCode(FactConstant.JIE_DAO_XIANG_GUAN + ":" + formDTO.getIndexCode());
//1.根据类型判断是查询组织数据还是网格数据
//组织层级数据
if (FactConstant.AGENCY.equals(formDTO.getOrgType())) {
//2.根据组织Id查询组织信息
CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId());
if (null == agency) {
throw new RenException(String.format("根据组织Id未查询到组织信息,组织Id:%s", formDTO.getOrgId()));
}
resultList = factIndexAgencySubScoreDao.selectAblityList(formDTO);
//3.根据组织级别拼接查询条件,判断查询不同数据表
//区县级、乡镇街道级
if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) {
if ("district".equals(agency.getLevel())) {
formDTO.setAllParentIndexCode(FactConstant.QUAN_QU_XIANG_GUAN + ":" + formDTO.getIndexCode());
} else {
formDTO.setAllParentIndexCode(FactConstant.JIE_DAO_XIANG_GUAN + ":" + formDTO.getIndexCode());
}
resultList = factIndexAgencySubScoreDao.selectAblityList(formDTO);
//社区级
} else if ("community".equals(agency.getLevel())) {
formDTO.setAllParentIndexCode(FactConstant.SHE_QU_XIANG_GUAN + ":" + formDTO.getIndexCode());
resultList = factIndexCommunitySubScoreDao.selectCommunityAblityList(formDTO);
//社区级
} else if ("community".equals(agency.getLevel())) {
formDTO.setAllParentIndexCode(FactConstant.SHE_QU_XIANG_GUAN + ":" + formDTO.getIndexCode());
resultList = factIndexCommunitySubScoreDao.selectCommunityAblityList(formDTO);
} else {
throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId()));
}
//网格层级数据
} else if (FactConstant.GRID.equals(formDTO.getOrgType())) {
//4.查询网格层级各项能力对应指标数据
formDTO.setAllParentIndexCode(FactConstant.WANG_GE_XIANG_GUAN + ":" + formDTO.getIndexCode());
resultList = factIndexGridSubScoreDao.selectGridAblityList(formDTO);
} else {
throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getAgencyId()));
throw new RenException(String.format("按月查询各项指标数据,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType()));
}
//3.调用方法判断各项指标是数字指标还是百分比指标 //TODO
//4.调用方法判断各项指标是数字指标还是百分比指标 //TODO 记得value值保留一位小数 是数的保留零位小数 是百分比的保留一位小数
return resultList;
}
@ -196,24 +347,33 @@ public class FactIndexServiceImpl implements FactIndexService {
LinkedList<MonthAblityListResultDTO> resultList = new LinkedList<>();
//1.计算所查月份前12个月的monthId
formDTO.setStartMonthId(getDate(formDTO.getMonthId()));
//2.根据组织Id查询组织信息
CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getAgencyId());
if (null == agency) {
throw new RenException(String.format("查询到组织信息失败,组织Id:%s", formDTO.getAgencyId()));
}
//3.根据组织级别拼接查询条件,判断查询不同数据表
//区县级、乡镇街道级
if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) {
resultList = factIndexAgencySubScoreDao.selectMonthAblityList(formDTO);
//社区级
} else if ("community".equals(agency.getLevel())) {
resultList = factIndexCommunitySubScoreDao.selectCommunityMonthAblityList(formDTO);
//2.根据类型判断是查询组织数据还是网格数据
//组织层级数据
if (FactConstant.AGENCY.equals(formDTO.getOrgType())) {
//3.根据组织Id查询组织信息
CompartmentResultDTO agency = screenCustomerAgencyDao.getAgencyAreaInfo(formDTO.getOrgId());
if (null == agency) {
throw new RenException(String.format("查询到组织信息失败,组织Id:%s", formDTO.getOrgId()));
}
//4.根据组织级别拼接查询条件,判断查询不同数据表
//区县级、乡镇街道级
if ("district".equals(agency.getLevel()) || "street".equals(agency.getLevel())) {
resultList = factIndexAgencySubScoreDao.selectMonthAblityList(formDTO);
//社区级
} else if ("community".equals(agency.getLevel())) {
resultList = factIndexCommunitySubScoreDao.selectCommunityMonthAblityList(formDTO);
} else {
throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getOrgId()));
}
//网格层级数据
} else if (FactConstant.GRID.equals(formDTO.getOrgType())) {
//5.查询网格层级某项能力对应的一项指标过去12个月份数据
resultList = factIndexGridSubScoreDao.selectGridMonthAblityList(formDTO);
} else {
throw new RenException(String.format("根据组织Id查询到的组织级别信息错误,组织Id:%s", formDTO.getAgencyId()));
throw new RenException(String.format("按月查询各项指标最近12个月数据,orgType类型错误,组织Id:%s,类型Type:%s", formDTO.getOrgId(), formDTO.getOrgType()));
}
//3.调用方法判断各项指标是数字指标还是百分比指标//TODO
//6.调用方法判断各项指标是数字指标还是百分比指标//TODO 记得value值保留一位小数 是数的保留零位小数 是百分比的保留一位小数
return resultList;
}
@ -243,7 +403,7 @@ public class FactIndexServiceImpl implements FactIndexService {
*/
@Override
public List<PeerComparisonResultDTO> peerComparison(PeerComparisonFormDTO formDTO) {
//1.根据组织Id的上级组织Id查询同级组织对应类型的得分排名(查询最近一个月数据)
//1.根据组织或网格Id的上级组织Id查询同级组织或网格对应类型的得分排名(查询最近一个月数据)
List<PeerComparisonResultDTO> resultList = screenIndexDataMonthlyDao.selectScoreList(formDTO);
return resultList;
}

45
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml

@ -3,16 +3,49 @@
<mapper namespace="com.epmet.datareport.dao.fact.FactIndexAgencyScoreDao">
<select id="selectScore" resultType="com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO">
<select id="selectAblityIndex" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO">
SELECT
fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal"
FROM
fact_index_agency_score fact
WHERE
fact.del_flag = '0'
AND fact.customer_id = #{customerId}
AND fact.agency_id = #{orgId}
AND fact.month_id &gt; #{startMonthId}
AND fact.month_id &lt;= #{monthId}
AND fact.index_code = #{indexCode}
ORDER BY
fact.month_id ASC
</select>
<select id="selectScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO">
SELECT
#{indexCode} AS "indexCode",
ROUND(fact.score, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore"
FROM
fact_index_agency_score fact
INNER JOIN fact_index_agency_self_sub_score self ON fact.agency_id = self.agency_id
AND fact.month_id = self.month_id
AND fact.index_code = self.parent_index_code
WHERE
fact.del_flag = '0'
AND self.del_flag = '0'
AND fact.customer_id = #{customerId}
AND fact.agency_id = #{orgId}
AND fact.month_id = #{monthId}
AND fact.index_code = #{indexCode}
</select>
<select id="selectAblityIndex" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO">
<select id="selectMonthScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO">
SELECT
fact.month_id AS "monthId",
ROUND(fact.score * fact.weight, 1) AS "indexTotal",
ROUND(self.self_score * self.self_weight,1) AS "agencyScore",
ROUND(self.sub_score * self.sub_weight,1) AS "subAgencyScore"
ROUND(fact.score, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore"
FROM
fact_index_agency_score fact
INNER JOIN fact_index_agency_self_sub_score self ON fact.agency_id = self.agency_id
@ -22,7 +55,7 @@
fact.del_flag = '0'
AND self.del_flag = '0'
AND fact.customer_id = #{customerId}
AND fact.agency_id = #{agencyId}
AND fact.agency_id = #{orgId}
AND fact.month_id &gt; #{startMonthId}
AND fact.month_id &lt;= #{monthId}
AND fact.index_code = #{indexCode}

8
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml

@ -6,7 +6,7 @@
<select id="selectAblityList" resultType="com.epmet.evaluationindex.screen.dto.result.AblityListResultDTO">
SELECT
fact.index_code AS "key",
IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value",
IF(fact.origin_value='',0,IFNULL(ROUND(fact.origin_value,1),0)) AS "value",
dict.index_name AS "name"
FROM
fact_index_agency_sub_score fact
@ -16,14 +16,14 @@
AND dict.del_flag = '0'
AND fact.all_parent_index_code = #{allParentIndexCode}
AND customer_id = #{customerId}
AND agency_id = #{agencyId}
AND agency_id = #{orgId}
AND month_id = #{monthId}
</select>
<select id="selectMonthAblityList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthAblityListResultDTO">
SELECT
fact.month_id AS "monthId",
IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "ablity"
IF(fact.origin_value='',0,IFNULL(ROUND(fact.origin_value,1),0)) AS "ablity"
FROM
fact_index_agency_sub_score fact
LEFT JOIN index_dict dict ON fact.index_code = dict.index_code
@ -31,7 +31,7 @@
fact.del_flag = '0'
AND dict.del_flag = '0'
AND customer_id = #{customerId}
AND agency_id = #{agencyId}
AND agency_id = #{orgId}
AND month_id &lt;= #{monthId}
AND month_id &gt; #{startMonthId}
AND fact.index_code = #{key}

45
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml

@ -6,9 +6,46 @@
<select id="selectCommunityAblityIndex" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO">
SELECT
fact.month_id AS "monthId",
ROUND(fact.score * fact.weight, 1) AS "indexTotal",
ROUND(self.self_score * self.self_weight,1) AS "agencyScore",
ROUND(self.sub_score * self.sub_weight,1) AS "subAgencyScore"
ROUND(fact.score, 1) AS "indexTotal"
FROM
fact_index_community_score fact
WHERE
fact.del_flag = '0'
AND fact.customer_id = #{customerId}
AND fact.agency_id = #{orgId}
AND fact.month_id &gt; #{startMonthId}
AND fact.month_id &lt;= #{monthId}
AND fact.index_code = #{indexCode}
ORDER BY
fact.month_id ASC
</select>
<select id="selectCommunityScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO">
SELECT
#{indexCode} AS "indexCode",
ROUND(fact.score, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore"
FROM
fact_index_community_score fact
INNER JOIN fact_index_community_self_sub_score self ON fact.agency_id = self.agency_id
AND fact.month_id = self.month_id
AND fact.index_code = self.parent_index_code
WHERE
fact.del_flag = '0'
AND self.del_flag = '0'
AND fact.customer_id = #{customerId}
AND fact.agency_id = #{orgId}
AND fact.month_id = #{monthId}
AND fact.index_code = #{indexCode}
</select>
<select id="selectCommunityMonthScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO">
SELECT
fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore"
FROM
fact_index_community_score fact
INNER JOIN fact_index_community_self_sub_score self ON fact.agency_id = self.agency_id
@ -18,7 +55,7 @@
fact.del_flag = '0'
AND self.del_flag = '0'
AND fact.customer_id = #{customerId}
AND fact.agency_id = #{agencyId}
AND fact.agency_id = #{orgId}
AND fact.month_id &gt; #{startMonthId}
AND fact.month_id &lt;= #{monthId}
AND fact.index_code = #{indexCode}

8
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml

@ -6,7 +6,7 @@
<select id="selectCommunityAblityList" resultType="com.epmet.evaluationindex.screen.dto.result.AblityListResultDTO">
SELECT
fact.index_code AS "key",
IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value",
IF(fact.origin_value='',0,IFNULL(ROUND(fact.origin_value,1),0)) AS "value",
dict.index_name AS "name"
FROM
fact_index_community_sub_score fact
@ -16,14 +16,14 @@
AND dict.del_flag = '0'
AND fact.all_parent_index_code = #{allParentIndexCode}
AND customer_id = #{customerId}
AND agency_id = #{agencyId}
AND agency_id = #{orgId}
AND month_id = #{monthId}
</select>
<select id="selectCommunityMonthAblityList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthAblityListResultDTO">
SELECT
fact.month_id AS "monthId",
IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "ablity"
IF(fact.origin_value='',0,IFNULL(ROUND(fact.origin_value,1),0)) AS "ablity"
FROM
fact_index_community_sub_score fact
LEFT JOIN index_dict dict ON fact.index_code = dict.index_code
@ -31,7 +31,7 @@
fact.del_flag = '0'
AND dict.del_flag = '0'
AND customer_id = #{customerId}
AND agency_id = #{agencyId}
AND agency_id = #{orgId}
AND month_id &lt;= #{monthId}
AND month_id &gt; #{startMonthId}
AND fact.index_code = #{key}

61
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml

@ -3,5 +3,66 @@
<mapper namespace="com.epmet.datareport.dao.fact.FactIndexGridScoreDao">
<select id="selectGridAblityIndex" resultType="com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO$ScoreListResultDTO">
SELECT
fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal"
FROM
fact_index_grid_score fact
WHERE
fact.del_flag = '0'
AND fact.customer_id = #{customerId}
AND fact.grid_id = #{orgId}
AND fact.month_id &gt; #{startMonthId}
AND fact.month_id &lt;= #{monthId}
AND fact.index_code = #{indexCode}
ORDER BY
fact.month_id ASC
</select>
<select id="selectGridScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO">
SELECT
#{indexCode} AS "indexCode",
ROUND(fact.score, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore"
FROM
fact_index_grid_score fact
INNER JOIN fact_index_grid_self_sub_score self ON fact.grid_id = self.grid_id
AND fact.agency_id = self.agency_id
AND fact.month_id = self.month_id
AND fact.index_code = self.parent_index_code
WHERE
fact.del_flag = '0'
AND self.del_flag = '0'
AND fact.customer_id = #{customerId}
AND fact.grid_id = #{orgId}
AND fact.month_id = #{monthId}
AND fact.index_code = #{indexCode}
</select>
<select id="selectGridMonthScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO$ScoreListResultDTO">
SELECT
fact.month_id AS "monthId",
ROUND(fact.score, 1) AS "indexTotal",
ROUND(self.self_score, 1) AS "agencyScore",
ROUND(self.sub_score, 1) AS "subAgencyScore"
FROM
fact_index_grid_score fact
INNER JOIN fact_index_grid_self_sub_score self ON fact.grid_id = self.grid_id
AND fact.agency_id = self.agency_id
AND fact.month_id = self.month_id
AND fact.index_code = self.parent_index_code
WHERE
fact.del_flag = '0'
AND self.del_flag = '0'
AND fact.customer_id = #{customerId}
AND fact.grid_id = #{orgId}
AND fact.month_id &gt; #{startMonthId}
AND fact.month_id &lt;= #{monthId}
AND fact.index_code = #{indexCode}
ORDER BY
fact.month_id ASC
</select>
</mapper>

35
epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml

@ -3,5 +3,40 @@
<mapper namespace="com.epmet.datareport.dao.fact.FactIndexGridSubScoreDao">
<select id="selectGridAblityList" resultType="com.epmet.evaluationindex.screen.dto.result.AblityListResultDTO">
SELECT
fact.index_code AS "key",
IF(fact.origin_value='',0,IFNULL(ROUND(fact.origin_value,1),0)) AS "value",
dict.index_name AS "name"
FROM
fact_index_grid_sub_score fact
LEFT JOIN index_dict dict ON fact.index_code = dict.index_code
WHERE
fact.del_flag = '0'
AND dict.del_flag = '0'
AND fact.all_parent_index_code = #{allParentIndexCode}
AND customer_id = #{customerId}
AND grid_id = #{orgId}
AND month_id = #{monthId}
</select>
<select id="selectGridMonthAblityList" resultType="com.epmet.evaluationindex.screen.dto.result.MonthAblityListResultDTO">
SELECT
fact.month_id AS "monthId",
IF(fact.origin_value='',0,IFNULL(ROUND(fact.origin_value,1),0)) AS "ablity"
FROM
fact_index_grid_sub_score fact
LEFT JOIN index_dict dict ON fact.index_code = dict.index_code
WHERE
fact.del_flag = '0'
AND dict.del_flag = '0'
AND customer_id = #{customerId}
AND grid_id = #{orgId}
AND month_id &lt;= #{monthId}
AND month_id &gt; #{startMonthId}
AND fact.index_code = #{key}
ORDER BY
fact.month_id ASC
</select>
</mapper>

2
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml

@ -16,6 +16,7 @@
WHERE
del_flag = 0
AND pid = '0'
AND IS_DISPLAY = '1'
AND customer_id = #{customerId}
</select>
@ -31,6 +32,7 @@
screen_customer_agency
WHERE
del_flag = '0'
AND IS_DISPLAY = '1'
AND pids = #{subAgencyPids}
ORDER BY
created_time DESC

1
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml

@ -77,6 +77,7 @@
screen_customer_grid
WHERE
del_flag = '0'
AND IS_DISPLAY = '1'
AND parent_agency_id = #{agencyId}
ORDER BY
created_time DESC

10
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml

@ -110,8 +110,8 @@
<select id="selectScoreList" resultType="com.epmet.evaluationindex.screen.dto.result.PeerComparisonResultDTO">
SELECT
org_id AS "agencyId",
org_name AS "agencyName",
org_id AS "orgId",
org_name AS "orgName",
<if test="indexCode != null and indexCode != '' and indexCode == 'dangjiannengli'">
round((party_dev_ablity * party_dev_weight),1) AS "score"
</if>
@ -125,7 +125,7 @@
screen_index_data_monthly
WHERE
del_flag = '0'
AND org_type = 'agency'
AND org_type = #{orgType}
AND customer_id = #{customerId}
AND parent_id = (
select
@ -134,9 +134,9 @@
screen_index_data_monthly
where
del_flag = '0'
and org_type = 'agency'
and org_type = #{orgType}
and customer_id = #{customerId}
and org_id = #{agencyId}
and org_id = #{orgId}
order by
created_time desc
limit 1

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

@ -44,4 +44,58 @@
and ur.CUSTOMER_ID = #{customerId}
order by ur.POINT_TOTAL desc
</select>
<select id="selectAgencyUserPointList" resultType="com.epmet.evaluationindex.screen.dto.result.UserPointRankListResultDTO">
SELECT
org_id AS "agencyId",
org_name AS "agencyName",
grid_id AS "gridId",
grid_name AS "gridName",
user_id AS "userId",
user_name AS "userName",
point_total AS "pointTotal"
FROM
screen_party_user_rank_data
WHERE
del_flag = '0'
<if test="orgType != null and orgType !='' and orgType = 'agency'">
<if test="orgType = 'agency'">
AND org_id = #{orgId}
</if>
<if test="orgType = 'grid'">
AND grid_id = #{orgId}
</if>
</if>
ORDER BY
point_total DESC
LIMIT #{topNum}
</select>
<select id="selectPartymemberPointList" resultType="com.epmet.evaluationindex.screen.dto.result.PartIndexScroeRankResultDTO">
SELECT
org_id AS "agencyId",
org_name AS "agencyName",
grid_id AS "gridId",
grid_name AS "gridName",
user_id AS "userId",
user_name AS "userName",
index_score AS "indexScore"
FROM
screen_party_user_rank_data
WHERE
del_flag = '0'
AND party_flag = '1'<!-- 是否是党员标志:1是。0不是党员 -->
<if test="orgType != null and orgType !='' and orgType = 'agency'">
<if test="orgType = 'agency'">
AND org_id = #{orgId}
</if>
<if test="orgType = 'grid'">
AND grid_id = #{orgId}
</if>
</if>
ORDER BY
point_total DESC
LIMIT #{topNum}
</select>
</mapper>

1
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java

@ -14,4 +14,5 @@ public interface DataSourceConstant {
String EVALUATION_INDEX = "evaluationIndex";
String PARTY_MEMBER = "partyMember";
String EPMET_HEART="epmetHeart";
String EPMET_POINT = "epmetPoint";
}

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/IssueMainDailyFormDTO.java

@ -91,6 +91,11 @@ public class IssueMainDailyFormDTO implements Serializable {
*/
private String issueStatus;
/**
* 关闭状态
*/
private String resolveType;
/**
* 创建话题用户身份标识
*/

97
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ScreenPartyBranchDataFormDTO.java

@ -0,0 +1,97 @@
package com.epmet.dto.extract.form;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/9/25 9:07 上午
*/
@Data
public class ScreenPartyBranchDataFormDTO implements Serializable {
private static final long serialVersionUID = -5521810726686859779L;
/**
* 客户Id
*/
private String customerId;
/**
* 年Id
*/
private String yearId;
/**
* 月份Id
*/
private String monthId;
/**
* 数据类别 party:支部建设; union:联合建设党员志愿服务voluntaryservice
*/
private String type;
/**
* 组织类别 agency组织部门department网格grid
*/
private String orgType;
/**
* 组织Id 可以为网格机关id
*/
private String orgId;
/**
* 上级组织Id
*/
private String parentId;
/**
* 组织名称
*/
private String orgName;
/**
* 会议分类Id
*/
private String meetCategoryId;
/**
* 会议分类名称三会党课主题党日.....等等
*/
private String meetCategoryName;
/**
* 组织次数
*/
private Integer organizeCount;
/**
* 参加人数
*/
private Integer joinUserCount;
/**
* 平均参加人数
*/
private Integer averageJoinUserCount;
private String delFlag;
private Integer revision;
private String createdBy;
private String updatedBy;
public ScreenPartyBranchDataFormDTO() {
this.delFlag = NumConstant.ZERO_STR;
this.revision = NumConstant.ZERO;
this.createdBy = "APP_USER";
this.updatedBy = "APP_USER";
this.type = "voluntaryservice";
}
}

73
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/ScreenPartyLinkMassesDataFormDTO.java

@ -0,0 +1,73 @@
package com.epmet.dto.extract.form;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/9/24 6:03 下午
*/
@Data
public class ScreenPartyLinkMassesDataFormDTO implements Serializable {
private static final long serialVersionUID = -7534140815638694052L;
/**
* 客户Id
*/
private String customerId;
/**
* 组织类别 agency组织部门department网格grid
*/
private String orgType;
/**
* 组织Id 可以为网格机关id
*/
private String orgId;
/**
* 上级组织Id
*/
private String parentId;
/**
* 组织名称
*/
private String orgName;
/**
* 党员建群总数
*/
private Integer createGroupTotal;
/**
* 群成员总数
*/
private Integer groupUserTotal;
/**
* 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)
*/
private String dataEndTime;
private String delFlag;
private Integer revision;
private String createdBy;
private String updatedBy;
public ScreenPartyLinkMassesDataFormDTO() {
this.createGroupTotal = NumConstant.ZERO;
this.groupUserTotal = NumConstant.ZERO;
this.delFlag = NumConstant.ZERO_STR;
this.revision = NumConstant.ZERO;
this.createdBy = "APP_USER";
this.updatedBy = "APP_USER";
}
}

19
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridInfoResultDTO.java

@ -0,0 +1,19 @@
package com.epmet.dto.extract.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/9/24 2:59 下午
*/
@Data
public class GridInfoResultDTO implements Serializable {
private static final long serialVersionUID = -8146474744340303247L;
private String agencyId;
private String gridId;
}

23
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridPartyDTO.java

@ -0,0 +1,23 @@
package com.epmet.dto.extract.result;
import com.epmet.dto.extract.form.PartyBaseInfoFormDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/9/24 2:45 下午
*/
@Data
@AllArgsConstructor
public class GridPartyDTO implements Serializable {
private static final long serialVersionUID = -6699064424253966688L;
private List<String> orgIds;
private List<PartyBaseInfoFormDTO> result;
}

23
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridPartyGuideDTO.java

@ -0,0 +1,23 @@
package com.epmet.dto.extract.result;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/9/25 10:10 上午
*/
@Data
@AllArgsConstructor
public class GridPartyGuideDTO implements Serializable {
private static final long serialVersionUID = 8986034496647129566L;
private List<String> orgIds;
private List<ScreenPartyLinkMassesDataFormDTO> result;
}

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/IssueInfoResultDTO.java

@ -47,4 +47,9 @@ public class IssueInfoResultDTO implements Serializable {
* 用户ID
*/
private String userId;
/**
* 关闭状态
*/
private String resolveType;
}

25
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/OrgNameResultDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.extract.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/9/24 1:23 下午
*/
@Data
public class OrgNameResultDTO implements Serializable {
private static final long serialVersionUID = -4815327768546033428L;
private String gridId;
private String agencyId;
private String gridName;
private String agencyName;
private String parentId;
}

1
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/GridInfoDTO.java

@ -35,6 +35,7 @@ public class GridInfoDTO implements Serializable {
/**
* 所有上级组织ID,英文:隔开
* agencyId的pids
*/
private String pids;
}

26
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/form/ScreenCentralZoneDataFormDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.screen.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 大屏中央区数据写入传参DTO
* @ClassName ScreenCentralZoneDataFormDTO
* @Auth wangc
* @Date 2020-09-24 10:02
*/
@Data
public class ScreenCentralZoneDataFormDTO implements Serializable {
private static final long serialVersionUID = -6621150245370746092L;
/**
* 客户Id
* */
private String customerId;
/**
* 时间维度 不一定是dateId 需要根据其格式进行判断维度的类型
* */
private String dateId;
}

9
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/DataStatisticalOpenFeignClient.java

@ -220,4 +220,13 @@ public interface DataStatisticalOpenFeignClient {
*/
@PostMapping("/data/stats/eidim/init-all")
Result initAllEIDims();
/**
* @Description 抽取数据到大屏
* @param extractFormDTO
* @author zxc
* @date 2020/9/24 10:15 上午
*/
@PostMapping(value = "/data/stats/screenextract/extractdailyall")
Result extractDailyAll(@RequestBody(required = false) ExtractFormDTO extractFormDTO);
}

5
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/feign/impl/DataStatisticalOpenFeignClientFallBack.java

@ -212,4 +212,9 @@ public class DataStatisticalOpenFeignClientFallBack implements DataStatisticalOp
public Result initAllEIDims() {
return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "initAllEIDims");
}
@Override
public Result extractDailyAll(ExtractFormDTO extractFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.DATA_STATISTICAL_SERVER, "extractDailyAll",extractFormDTO);
}
}

26
epmet-module/data-statistical/data-statistical-server/pom.xml

@ -70,7 +70,7 @@
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-extapp-auth</artifactId>
<artifactId>common-service-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
@ -216,6 +216,12 @@
<datasource.druid.epmetHeart.username>epmet_heart_user</datasource.druid.epmetHeart.username>
<datasource.druid.epmetHeart.password>EpmEt-db-UsEr</datasource.druid.epmetHeart.password>
<datasource.druid.epmetPoint.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_point?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.epmetPoint.url>
<datasource.druid.epmetPoint.username>epmet_point_user</datasource.druid.epmetPoint.username>
<datasource.druid.epmetPoint.password>EpmEt-db-UsEr</datasource.druid.epmetPoint.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.130</spring.redis.host>
@ -326,6 +332,12 @@
<datasource.druid.epmetHeart.username>epmet_heart_user</datasource.druid.epmetHeart.username>
<datasource.druid.epmetHeart.password>EpmEt-db-UsEr</datasource.druid.epmetHeart.password>
<datasource.druid.epmetPoint.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_point?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.epmetPoint.url>
<datasource.druid.epmetPoint.username>epmet_point_user</datasource.druid.epmetPoint.username>
<datasource.druid.epmetPoint.password>EpmEt-db-UsEr</datasource.druid.epmetPoint.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.130</spring.redis.host>
@ -436,6 +448,12 @@
<datasource.druid.epmetHeart.username>epmet</datasource.druid.epmetHeart.username>
<datasource.druid.epmetHeart.password>elink@833066</datasource.druid.epmetHeart.password>
<datasource.druid.epmetPoint.url>
<![CDATA[jdbc:mysql://rm-m5ef9t617j6o5eup7.mysql.rds.aliyuncs.com:3306/epmet_point?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.epmetPoint.url>
<datasource.druid.epmetPoint.username>epmet</datasource.druid.epmetPoint.username>
<datasource.druid.epmetPoint.password>elink@833066</datasource.druid.epmetPoint.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
@ -542,6 +560,12 @@
<datasource.druid.epmetHeart.username>epmet_heart_user</datasource.druid.epmetHeart.username>
<datasource.druid.epmetHeart.password>EpmEt-db-UsEr</datasource.druid.epmetHeart.password>
<datasource.druid.epmetPoint.url>
<![CDATA[jdbc:mysql://rm-m5e3vzs2637224wj9.mysql.rds.aliyuncs.com:3306/epmet_point?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.epmetPoint.url>
<datasource.druid.epmetPoint.username>epmet_point_user</datasource.druid.epmetPoint.username>
<datasource.druid.epmetPoint.password>EpmEt-db-UsEr</datasource.druid.epmetPoint.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>r-m5ez3n1j0qc3ykq2ut.redis.rds.aliyuncs.com</spring.redis.host>

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/ProjectConstant.java

@ -53,4 +53,13 @@ public interface ProjectConstant {
*/
String STATS_FAILED_PREFIX = "统计数据执行失败:%s 客户ID:%s,统计日期:%s";
/**
* 自身
*/
String ZI_SHEN = "zishen";
/**
* 下级
*/
String XIA_JI = "xiaji";
}

20
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java

@ -18,6 +18,7 @@ import com.epmet.dao.stats.DimMonthDao;
import com.epmet.dto.AgencySubTreeDto;
import com.epmet.dto.extract.form.ExtractFormDTO;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO;
import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity;
@ -35,11 +36,14 @@ import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollStreetServ
import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService;
import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService;
import com.epmet.service.evaluationindex.extract.toscreen.PartyBaseInfoService;
import com.epmet.service.evaluationindex.extract.toscreen.ScreenCentralZoneDataAbsorptionService;
import com.epmet.service.evaluationindex.extract.toscreen.PartyGuideService;
import com.epmet.service.evaluationindex.indexcal.*;
import com.epmet.service.stats.DimAgencyService;
import com.epmet.service.stats.DimCustomerPartymemberService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -99,6 +103,8 @@ public class DemoController {
private IndexCollCommunityService indexCollCommunityService;
@Autowired
private IndexCollStreetService indexCollStreetService;
@Autowired
private ScreenCentralZoneDataAbsorptionService screenCentralZoneDataAbsorptionService;
@GetMapping("testAlarm")
public void testAlarm() {
@ -642,4 +648,18 @@ public class DemoController {
return new Result();
}
@Autowired
private PartyGuideService partyGuideService;
@PostMapping("zxczxc")
public Result getZxcZxc(@RequestBody CustomerIdAndDateIdFormDTO formDTO){
partyGuideService.partyGuideExtract(formDTO.getCustomerId(),formDTO.getDateId());
return new Result();
}
@PostMapping("centralzonedatacleaning")
public Result centralZoneDataCleaning(@RequestBody ScreenCentralZoneDataFormDTO param){
screenCentralZoneDataAbsorptionService.centralZoneDataHub(param);
return new Result();
}
}

55
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java

@ -1,15 +1,10 @@
package com.epmet.controller;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.extappauth.bean.ExternalAppRequestParam;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.indexcollect.form.*;
import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
* 指标采集相关api
@ -27,128 +22,112 @@ public class FactIndexCollectController {
/**
* 1党建能力-党员相关指标上报(按照月份)
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-20
**/
@ExternalAppRequestAuth
@PostMapping("gridpartymemberdata")
public Result gridPartyMemberData(ExternalAppRequestParam externalAppRequestParam, @RequestBody GridPartyMemberDataFormDTO formDTO) {
factIndexCollectService.insertGridPartyMemberData(formDTO,externalAppRequestParam.getCustomerId() );
public Result gridPartyMemberData(@RequestHeader("CustomerId") String customerId, @RequestBody GridPartyMemberDataFormDTO formDTO) {
factIndexCollectService.insertGridPartyMemberData(formDTO, customerId);
return new Result();
}
/**
* 2党建能力-网格相关指标上报(按照月份)
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-20
**/
@ExternalAppRequestAuth
@PostMapping("gridpartyability")
public Result gridPartyAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody GridPartyAbilityDataFormDTO formDTO) {
factIndexCollectService.insertGridPartyAbility(formDTO, externalAppRequestParam.getCustomerId());
public Result gridPartyAbility(@RequestHeader("CustomerId") String customerId, @RequestBody GridPartyAbilityDataFormDTO formDTO) {
factIndexCollectService.insertGridPartyAbility(formDTO, customerId);
return new Result();
}
/**
* 3党建能力-街道及社区相关指标
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-20
**/
@ExternalAppRequestAuth
@PostMapping("orgpartyability")
public Result orgPartyAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody OrgPartyAbilityDataFormDTO formDTO) {
factIndexCollectService.insertOrgPartyAbility(formDTO, externalAppRequestParam.getCustomerId());
public Result orgPartyAbility(@RequestHeader("CustomerId") String customerId, @RequestBody OrgPartyAbilityDataFormDTO formDTO) {
factIndexCollectService.insertOrgPartyAbility(formDTO, customerId);
return new Result();
}
/**
* 4服务能力-网格相关指标
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-20
**/
@ExternalAppRequestAuth
@PostMapping("gridserviceability")
public Result gridServiceAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody GridServiceAbilityDataFormDTO formDTO) {
factIndexCollectService.insertGridServiceAbility(formDTO, externalAppRequestParam.getCustomerId());
public Result gridServiceAbility(@RequestHeader("CustomerId") String customerId, @RequestBody GridServiceAbilityDataFormDTO formDTO) {
factIndexCollectService.insertGridServiceAbility(formDTO, customerId);
return new Result();
}
/**
* 5服务能力-组织街道|社区|全区相关指标
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-20
**/
@ExternalAppRequestAuth
@PostMapping("orgserviceability")
public Result orgServiceAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody OrgServiceAbilityDataFormDTO formDTO) {
factIndexCollectService.insertOrgServiceAbility(formDTO, externalAppRequestParam.getCustomerId());
public Result orgServiceAbility(@RequestHeader("CustomerId") String customerId, @RequestBody OrgServiceAbilityDataFormDTO formDTO) {
factIndexCollectService.insertOrgServiceAbility(formDTO, customerId);
return new Result();
}
/**
* 6治理能力-网格相关指标
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-20
**/
@ExternalAppRequestAuth
@PostMapping("gridgovrnability")
public Result gridGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody GridGovrnAbilityDataFormDTO formDTO) {
factIndexCollectService.insertGridGovrnAbility(formDTO, externalAppRequestParam.getCustomerId());
public Result gridGovrnAbility(@RequestHeader("CustomerId") String customerId, @RequestBody GridGovrnAbilityDataFormDTO formDTO) {
factIndexCollectService.insertGridGovrnAbility(formDTO, customerId);
return new Result();
}
/**
* 7治理能力-街道及社区相关指标
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-20
**/
@ExternalAppRequestAuth
@PostMapping("orggovrnability")
public Result orgGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody OrgGovrnAbilityDataFormDTO formDTO) {
factIndexCollectService.insertOrgGovrnAbility(formDTO, externalAppRequestParam.getCustomerId());
public Result orgGovrnAbility(@RequestHeader("CustomerId") String customerId, @RequestBody OrgGovrnAbilityDataFormDTO formDTO) {
factIndexCollectService.insertOrgGovrnAbility(formDTO, customerId);
return new Result();
}
/**
* 8治理能力-部门相关指标
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-20
**/
@ExternalAppRequestAuth
@PostMapping("deptgovrnability")
public Result deptGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody DeptGovrnAbilityDataFormDTO formDTO) {
factIndexCollectService.insertDeptGovrnAbility(formDTO, externalAppRequestParam.getCustomerId());
public Result deptGovrnAbility(@RequestHeader("CustomerId") String customerId, @RequestBody DeptGovrnAbilityDataFormDTO formDTO) {
factIndexCollectService.insertDeptGovrnAbility(formDTO, customerId);
return new Result();
}
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java

@ -1,7 +1,5 @@
package com.epmet.controller;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.extappauth.bean.ExternalAppRequestParam;
import com.epmet.commons.tools.enums.EnvEnum;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.redis.RedisKeys;
@ -20,10 +18,7 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.PreDestroy;
import java.util.Date;
@ -103,11 +98,8 @@ public class IndexCalculateController {
* @Author zhangyongç
* @Date 10:52 2020-08-20
**/
@ExternalAppRequestAuth
@PostMapping("all")
public Result<Boolean> indexCalculate(ExternalAppRequestParam externalAppRequestParam, @RequestBody CalculateCommonFormDTO formDTO) {
String customerId = externalAppRequestParam.getCustomerId();
//String customerId = "epmettest";
public Result<Boolean> indexCalculate(@RequestHeader("CustomerId") String customerId, @RequestBody CalculateCommonFormDTO formDTO) {
formDTO.setCustomerId(customerId);
indexCalculate(formDTO);
return new Result<Boolean>().ok(true);

159
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java

@ -1,16 +1,11 @@
package com.epmet.controller;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.extappauth.bean.ExternalAppRequestParam;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.screencoll.ScreenCollFormDTO;
import com.epmet.dto.screencoll.form.*;
import com.epmet.service.evaluationindex.screen.KcScreenCollService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
* 孔村大屏数据采集api
@ -31,16 +26,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_platform_summary_daily
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("homepage/platformsummary")
public Result platFormSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcHomePageFormDTO> formDTO) {
kcScreenCollService.insertPlatFormSummary(formDTO, externalAppRequestParam.getCustomerId());
public Result platFormSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcHomePageFormDTO> formDTO) {
kcScreenCollService.insertPlatFormSummary(formDTO, customerId);
return new Result();
}
@ -50,16 +45,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_issue_summary_grid_daily
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("issue/summary")
public Result issueSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcIssueSummaryFormDTO> formDTO) {
kcScreenCollService.insertIssueSummary(formDTO, externalAppRequestParam.getCustomerId());
public Result issueSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcIssueSummaryFormDTO> formDTO) {
kcScreenCollService.insertIssueSummary(formDTO, customerId);
return new Result();
}
@ -69,16 +64,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table: screen_kc_issue_trend_grid_monthly
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("issue/trend")
public Result issueTrend(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcIssueTrendFormDTO> formDTO) {
kcScreenCollService.insertIssueTrend(formDTO, externalAppRequestParam.getCustomerId());
public Result issueTrend(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcIssueTrendFormDTO> formDTO) {
kcScreenCollService.insertIssueTrend(formDTO, customerId);
return new Result();
}
@ -88,16 +83,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_user_summary_daily
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("user/summary")
public Result userSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcUserSummaryFormDTO> formDTO) {
kcScreenCollService.insertUserSummary(formDTO, externalAppRequestParam.getCustomerId());
public Result userSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcUserSummaryFormDTO> formDTO) {
kcScreenCollService.insertUserSummary(formDTO, customerId);
return new Result();
}
@ -107,16 +102,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_volunteer_heat_rank_grid_daily
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("volunteer/heartrank")
public Result volunteerHeartRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcVolunteerHeartRankFormDTO> formDTO) {
kcScreenCollService.insertVolunteerHeartRank(formDTO, externalAppRequestParam.getCustomerId());
public Result volunteerHeartRank(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcVolunteerHeartRankFormDTO> formDTO) {
kcScreenCollService.insertVolunteerHeartRank(formDTO, customerId);
return new Result();
}
@ -126,16 +121,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_user_trend_grid_monthly
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("user/userheartrank")
public Result userHeartRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcUserHeartRankFormDTO> formDTO) {
kcScreenCollService.insertUserHeartRank(formDTO, externalAppRequestParam.getCustomerId());
public Result userHeartRank(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcUserHeartRankFormDTO> formDTO) {
kcScreenCollService.insertUserHeartRank(formDTO, customerId);
return new Result();
}
@ -145,16 +140,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_act_summary_daily
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("act/summary")
public Result actSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcActSummaryFormDTO> formDTO) {
kcScreenCollService.insertActSummary(formDTO, externalAppRequestParam.getCustomerId());
public Result actSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcActSummaryFormDTO> formDTO) {
kcScreenCollService.insertActSummary(formDTO, customerId);
return new Result();
}
@ -164,16 +159,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_act_trend_monthly
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("act/trend")
public Result actTrend(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcActTrendFormDTO> formDTO) {
kcScreenCollService.insertActTrend(formDTO, externalAppRequestParam.getCustomerId());
public Result actTrend(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcActTrendFormDTO> formDTO) {
kcScreenCollService.insertActTrend(formDTO, customerId);
return new Result();
}
@ -183,16 +178,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_volunteer_summary_daily
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("act/volunteersummary")
public Result volunteerSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcVolunteerSummaryFormDTO> formDTO) {
kcScreenCollService.insertVolunteerSummary(formDTO, externalAppRequestParam.getCustomerId());
public Result volunteerSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcVolunteerSummaryFormDTO> formDTO) {
kcScreenCollService.insertVolunteerSummary(formDTO, customerId);
return new Result();
}
@ -202,16 +197,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_project_summary_grid_daily
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("project/summary")
public Result projectSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcProjectSummaryFormDTO> formDTO) {
kcScreenCollService.insertProjectSummary(formDTO, externalAppRequestParam.getCustomerId());
public Result projectSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcProjectSummaryFormDTO> formDTO) {
kcScreenCollService.insertProjectSummary(formDTO, customerId);
return new Result();
}
@ -221,16 +216,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_project_category_grid_daily
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("project/categorysummary")
public Result categorySummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcCategorySummaryFormDTO> formDTO) {
kcScreenCollService.insertCategorySummary(formDTO, externalAppRequestParam.getCustomerId());
public Result categorySummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcCategorySummaryFormDTO> formDTO) {
kcScreenCollService.insertCategorySummary(formDTO, customerId);
return new Result();
}
@ -240,16 +235,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_project_satis_grid_monthly
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("project/satisanalysis")
public Result projectSatisanalysis(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcProjectSatisanalysisFormDTO> formDTO) {
kcScreenCollService.insertProjectSatisanalysis(formDTO, externalAppRequestParam.getCustomerId());
public Result projectSatisanalysis(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcProjectSatisanalysisFormDTO> formDTO) {
kcScreenCollService.insertProjectSatisanalysis(formDTO, customerId);
return new Result();
}
@ -259,16 +254,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_news_summary_daily
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("news/summary")
public Result newsSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcNewsSummaryFormDTO> formDTO) {
kcScreenCollService.insertNewsSummary(formDTO, externalAppRequestParam.getCustomerId());
public Result newsSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcNewsSummaryFormDTO> formDTO) {
kcScreenCollService.insertNewsSummary(formDTO, customerId);
return new Result();
}
@ -278,16 +273,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_news_trend_monthly
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("news/trend")
public Result newsTrend(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcNewsTrendFormDTO> formDTO) {
kcScreenCollService.insertNewsTrend(formDTO, externalAppRequestParam.getCustomerId());
public Result newsTrend(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcNewsTrendFormDTO> formDTO) {
kcScreenCollService.insertNewsTrend(formDTO, customerId);
return new Result();
}
@ -297,16 +292,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_news_rank
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("news/hotrank")
public Result newsHotRank(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcNewsHotRankFormDTO> formDTO) {
kcScreenCollService.insertNewsHotRank(formDTO, externalAppRequestParam.getCustomerId());
public Result newsHotRank(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcNewsHotRankFormDTO> formDTO) {
kcScreenCollService.insertNewsHotRank(formDTO, customerId);
return new Result();
}
@ -316,16 +311,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_news_category_analysis
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("news/categoryanalysis")
public Result newsCategoryAnalysis(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcNewsCategoryAnalysisFormDTO> formDTO) {
kcScreenCollService.insertNewsCategoryAnalysis(formDTO, externalAppRequestParam.getCustomerId());
public Result newsCategoryAnalysis(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcNewsCategoryAnalysisFormDTO> formDTO) {
kcScreenCollService.insertNewsCategoryAnalysis(formDTO, customerId);
return new Result();
}
@ -335,16 +330,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_group_summary_grid_daily
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("group/summary")
public Result groupSummary(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcGroupSummaryFormDTO> formDTO) {
kcScreenCollService.insertGroupSummary(formDTO, externalAppRequestParam.getCustomerId());
public Result groupSummary(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcGroupSummaryFormDTO> formDTO) {
kcScreenCollService.insertGroupSummary(formDTO, customerId);
return new Result();
}
@ -354,16 +349,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_group_detail_grid_daily
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("group/detail")
public Result groupDetail(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcGroupDetailFormDTO> formDTO) {
kcScreenCollService.insertGroupDetail(formDTO, externalAppRequestParam.getCustomerId());
public Result groupDetail(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcGroupDetailFormDTO> formDTO) {
kcScreenCollService.insertGroupDetail(formDTO, customerId);
return new Result();
}
@ -373,16 +368,16 @@ public class KcScreenCollController {
* 所以如果项目上是分批上传第一次为isFirst=true,后面isFirst应为false
* table:screen_kc_topic_trend_grid_monthly
*
* @param externalAppRequestParam
*
* @param formDTO
* @return void
* @Author zhangyong
* @Date 15:57 2020-09-09
**/
@ExternalAppRequestAuth
@PostMapping("group/topictrend")
public Result groupTopicTrend(ExternalAppRequestParam externalAppRequestParam, @RequestBody ScreenCollFormDTO<KcGroupTopicTrendFormDTO> formDTO) {
kcScreenCollService.insertGroupTopicTrend(formDTO, externalAppRequestParam.getCustomerId());
public Result groupTopicTrend(@RequestHeader("CustomerId") String customerId, @RequestBody ScreenCollFormDTO<KcGroupTopicTrendFormDTO> formDTO) {
kcScreenCollService.insertGroupTopicTrend(formDTO, customerId);
return new Result();
}
}

35
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenExtractDailyController.java

@ -0,0 +1,35 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.extract.form.ExtractFormDTO;
import com.epmet.service.evaluationindex.extract.toscreen.ScreenExtractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Author zxc
* @DateTime 2020/9/24 9:42 上午
*/
@RestController
@RequestMapping("screenextract")
public class ScreenExtractDailyController {
@Autowired
private ScreenExtractService screenExtractService;
/**
* @Description 抽取数据到大屏
* @param extractFormDTO
* @author zxc
* @date 2020/9/24 10:15 上午
*/
@PostMapping("extractdailyall")
public Result screenExtractDaily(@RequestBody ExtractFormDTO extractFormDTO){
screenExtractService.extractDailyAll(extractFormDTO);
return new Result();
}
}

108
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ShiBeiScreenCollController.java

@ -1,15 +1,10 @@
package com.epmet.controller;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.extappauth.bean.ExternalAppRequestParam;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.screencoll.form.*;
import com.epmet.service.evaluationindex.screen.ShiBeiScreenCollService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
@ -28,144 +23,126 @@ public class ShiBeiScreenCollController {
/**
* 9党建引领|基层治理-居民党员积分排行榜
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("partyuserrankdata")
public Result partyUserRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody PartyUserRankDataListFormDTO formDTO) {
shiBeiScreenCollService.insertPartyUserRankData(formDTO, externalAppRequestParam.getCustomerId());
public Result partyUserRankData(@RequestHeader("CustomerId") String customerId, @RequestBody PartyUserRankDataListFormDTO formDTO) {
shiBeiScreenCollService.insertPartyUserRankData(formDTO, customerId);
return new Result();
}
/**
* 8党建引领-党员联系群众数据
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("partylinkmassesdata")
public Result partyLinkMassesData(ExternalAppRequestParam externalAppRequestParam, @RequestBody PartyLinkMassesDataListFormDTO formDTO) {
shiBeiScreenCollService.insertPartyLinkMassesData(formDTO, externalAppRequestParam.getCustomerId());
public Result partyLinkMassesData(@RequestHeader("CustomerId") String customerId, @RequestBody PartyLinkMassesDataListFormDTO formDTO) {
shiBeiScreenCollService.insertPartyLinkMassesData(formDTO, customerId);
return new Result();
}
/**
* 7基层党建-建设情况数据支部联建志愿
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("meetdata")
public Result meetData(ExternalAppRequestParam externalAppRequestParam, @RequestBody PartyBranchDataListFormDTO formDTO) {
shiBeiScreenCollService.insertPartyBranchData(formDTO, externalAppRequestParam.getCustomerId());
public Result meetData(@RequestHeader("CustomerId") String customerId, @RequestBody PartyBranchDataListFormDTO formDTO) {
shiBeiScreenCollService.insertPartyBranchData(formDTO, customerId);
return new Result();
}
/**
* 6党建引领-组织排行
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("orgrankdata")
public Result orgRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody OrgRankDataListFormDTO formDTO) {
shiBeiScreenCollService.insertOrgRankData(formDTO, externalAppRequestParam.getCustomerId());
public Result orgRankData(@RequestHeader("CustomerId") String customerId, @RequestBody OrgRankDataListFormDTO formDTO) {
shiBeiScreenCollService.insertOrgRankData(formDTO, customerId);
return new Result();
}
/**
* 5基层治理-治理能力数据
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("governrankdata")
public Result governRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody GovernRankDataListFormDTO formDTO) {
shiBeiScreenCollService.insertGovernRankData(formDTO, externalAppRequestParam.getCustomerId());
public Result governRankData(@RequestHeader("CustomerId") String customerId, @RequestBody GovernRankDataListFormDTO formDTO) {
shiBeiScreenCollService.insertGovernRankData(formDTO, customerId);
return new Result();
}
/**
* 4事件数据
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("eventdata")
public Result eventData(ExternalAppRequestParam externalAppRequestParam, @RequestBody EventDataListFormDTO formDTO) {
shiBeiScreenCollService.insertEventData(formDTO, externalAppRequestParam.getCustomerId());
public Result eventData(@RequestHeader("CustomerId") String customerId, @RequestBody EventDataListFormDTO formDTO) {
shiBeiScreenCollService.insertEventData(formDTO, customerId);
return new Result();
}
/**
* 3难点赌点
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("difficultydata")
public Result difficultyData(ExternalAppRequestParam externalAppRequestParam, @RequestBody DifficultyDataFormDTO formDTO) {
shiBeiScreenCollService.insertDifficultyData(formDTO, externalAppRequestParam.getCustomerId());
public Result difficultyData(@RequestHeader("CustomerId") String customerId, @RequestBody DifficultyDataFormDTO formDTO) {
shiBeiScreenCollService.insertDifficultyData(formDTO, customerId);
return new Result();
}
/**
* 2党员基本情况
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("cpcbasedata")
public Result cpcbaseData(ExternalAppRequestParam externalAppRequestParam, @RequestBody CpcBaseDataListFormDTO formDTO) {
shiBeiScreenCollService.insertCpcbaseData(formDTO, externalAppRequestParam.getCustomerId());
public Result cpcbaseData(@RequestHeader("CustomerId") String customerId, @RequestBody CpcBaseDataListFormDTO formDTO) {
shiBeiScreenCollService.insertCpcbaseData(formDTO, customerId);
return new Result();
}
/**
* 1指数_按月统计
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("indexdatamonthly")
public Result indexDataMonthly(ExternalAppRequestParam externalAppRequestParam, @RequestBody IndexDataListMonthlyFormDTO formDTO) {
shiBeiScreenCollService.insertIndexDataMonthly(formDTO, externalAppRequestParam.getCustomerId());
public Result indexDataMonthly(@RequestHeader("CustomerId") String customerId, @RequestBody IndexDataListMonthlyFormDTO formDTO) {
shiBeiScreenCollService.insertIndexDataMonthly(formDTO, customerId);
return new Result();
}
@ -174,112 +151,98 @@ public class ShiBeiScreenCollController {
/**
* 17指数_按年统计
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("indexdatayearly")
public Result indexDataYearly(ExternalAppRequestParam externalAppRequestParam, @RequestBody IndexDataListYearlyFormDTO formDTO) {
shiBeiScreenCollService.insertIndexDataYearly(formDTO, externalAppRequestParam.getCustomerId());
public Result indexDataYearly(@RequestHeader("CustomerId") String customerId, @RequestBody IndexDataListYearlyFormDTO formDTO) {
shiBeiScreenCollService.insertIndexDataYearly(formDTO, customerId);
return new Result();
}
/**
* 16部门信息上传
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("customerdept")
public Result customerDept(ExternalAppRequestParam externalAppRequestParam, @RequestBody CustomerDeptListFormDTO formDTO) {
shiBeiScreenCollService.insertCustomerDept(formDTO, externalAppRequestParam.getCustomerId());
public Result customerDept(@RequestHeader("CustomerId") String customerId, @RequestBody CustomerDeptListFormDTO formDTO) {
shiBeiScreenCollService.insertCustomerDept(formDTO, customerId);
return new Result();
}
/**
* 15网格信息上传
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("customergrid")
public Result customerGrid(ExternalAppRequestParam externalAppRequestParam, @RequestBody CustomerGridListFormDTO formDTO) {
shiBeiScreenCollService.insertCustomerGrid(formDTO, externalAppRequestParam.getCustomerId());
public Result customerGrid(@RequestHeader("CustomerId") String customerId, @RequestBody CustomerGridListFormDTO formDTO) {
shiBeiScreenCollService.insertCustomerGrid(formDTO, customerId);
return new Result();
}
/**
* 14组织层级
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("customeragency")
public Result customerAgency(ExternalAppRequestParam externalAppRequestParam, @RequestBody CustomerAgencyListFormDTO formDTO) {
shiBeiScreenCollService.insertCustomerAgency(formDTO, externalAppRequestParam.getCustomerId());
public Result customerAgency(@RequestHeader("CustomerId") String customerId, @RequestBody CustomerAgencyListFormDTO formDTO) {
shiBeiScreenCollService.insertCustomerAgency(formDTO, customerId);
return new Result();
}
/**
* 12中央区各类总数
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("usertotaldata")
public Result userTotalData(ExternalAppRequestParam externalAppRequestParam, @RequestBody UserTotalDataListFormDTO formDTO) {
shiBeiScreenCollService.insertUserTotalData(formDTO, externalAppRequestParam.getCustomerId());
public Result userTotalData(@RequestHeader("CustomerId") String customerId, @RequestBody UserTotalDataListFormDTO formDTO) {
shiBeiScreenCollService.insertUserTotalData(formDTO, customerId);
return new Result();
}
/**
* 11基层治理-公众参与
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("userjoin")
public Result userJoin(ExternalAppRequestParam externalAppRequestParam, @RequestBody UserJoinListFormDTO formDTO) {
shiBeiScreenCollService.insertUserJoin(formDTO, externalAppRequestParam.getCustomerId());
public Result userJoin(@RequestHeader("CustomerId") String customerId, @RequestBody UserJoinListFormDTO formDTO) {
shiBeiScreenCollService.insertUserJoin(formDTO, customerId);
return new Result();
}
/**
* 10党建引领-先锋模范数据
*
* @param externalAppRequestParam
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
@ExternalAppRequestAuth
@PostMapping("pioneerdata")
public Result pioneerData(ExternalAppRequestParam externalAppRequestParam, @RequestBody PioneerDataListFormDTO formDTO) {
shiBeiScreenCollService.insertPioneerData(formDTO, externalAppRequestParam.getCustomerId());
public Result pioneerData(@RequestHeader("CustomerId") String customerId, @RequestBody PioneerDataListFormDTO formDTO) {
shiBeiScreenCollService.insertPioneerData(formDTO, customerId);
return new Result();
}
@ -293,10 +256,9 @@ public class ShiBeiScreenCollController {
* @Author zhangyong
* @Date 09:44 2020-08-25
**/
@ExternalAppRequestAuth
@PostMapping("publicpartitotaldata")
public Result publicPartiTotalData(ExternalAppRequestParam externalAppRequestParam, @RequestBody PublicPartiTotalDataListFormDTO formDTO) {
shiBeiScreenCollService.insertPublicPartiTotalData(formDTO, externalAppRequestParam.getCustomerId());
public Result publicPartiTotalData(@RequestHeader("CustomerId") String customerId, @RequestBody PublicPartiTotalDataListFormDTO formDTO) {
shiBeiScreenCollService.insertPublicPartiTotalData(formDTO, customerId);
return new Result();
}
}

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginGroupMainDailyDao.java

@ -18,6 +18,7 @@
package com.epmet.dao.evaluationindex.extract;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.PartyCreateGroupCountResultDTO;
import com.epmet.dto.extract.FactOriginGroupMainDailyDTO;
import com.epmet.dto.extract.form.GridHeartedFormDTO;
@ -137,4 +138,13 @@ public interface FactOriginGroupMainDailyDao extends BaseDao<FactOriginGroupMain
* @Date 2020/9/20 21:29
**/
List<String> selectGroupMemberList(@Param("list") List<String> groupIdList);
/**
* @Description 查询党员建组信息
* @param customerId
* @param monthId
* @author zxc
* @date 2020/9/25 9:46 上午
*/
List<ScreenPartyLinkMassesDataFormDTO> selectPartyCreateGroupInfo(@Param("customerId") String customerId, @Param("monthId") String monthId,@Param("gridIds") List<String> gridIds);
}

48
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginIssueMainDailyDao.java

@ -123,30 +123,64 @@ public interface FactOriginIssueMainDailyDao extends BaseDao<FactOriginIssueMain
/**
* @return int
* @param customerId
* @param partyMemberUserIds
* @author yinzuomei
* @description 根据党员ids, 查询党员发布议题数
* @description 查询党员发布议题数
* @Date 2020/9/23 15:13
**/
int getParyPublishIssueTotal(@Param("customerId") String customerId, @Param("list")List<String> partyMemberUserIds);
int getParyPublishIssueTotal(@Param("customerId") String customerId,
@Param("gridId")String gridId,
@Param("agencyId")String agencyId);
/**
* @param customerId
* @param gridId
* @return int
* @author yinzuomei
* @description 具体某个网格的议题总数
* @description 具体某个网格/社区下的议题总数
* @Date 2020/9/23 15:23
**/
int getGridIssueTotalByGrid(@Param("customerId") String customerId, @Param("gridId") String gridId);
int getGridOrCommunityIssueTotal(@Param("customerId") String customerId, @Param("gridId") String gridId,@Param("communityId") String communityId);
/**
* @return int
* @param customerId
* @param gridId
* @param communityId
* @author yinzuomei
* @description 网格内议题转项目数
* @description 网格社区内议题转项目数
* @Date 2020/9/23 15:45
**/
int getShiftProjectTotalByGrid(@Param("customerId") String customerId, @Param("gridId") String gridId);
int getGridOrCommunityShiftProjectTotal(@Param("customerId") String customerId, @Param("gridId") String gridId,@Param("communityId") String communityId);
/**
* @return java.lang.Integer
* @param customerId
* @param agencyPath
* @author yinzuomei
* @description 组织内 党员发布议题
* @Date 2020/9/24 16:23
**/
Integer getAgencyParyPublishIssueTotal(@Param("customerId")String customerId,
@Param("agencyPath")String agencyPath);
/**
* @return int
* @param customerId
* @param agencyPath
* @author yinzuomei
* @description 组织内所有议题总数
* @Date 2020/9/24 16:26
**/
int getAgencyIssueTotal(@Param("customerId")String customerId,
@Param("agencyPath")String agencyPath);
/**
* @return java.lang.Integer
* @param customerId
* @param agencyPath
* @author yinzuomei
* @description 组织下议题转项目数
* @Date 2020/9/24 17:05
**/
Integer getAgencyShiftProjectTotal(@Param("customerId")String customerId,
@Param("agencyPath")String agencyPath);
}

21
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java

@ -111,10 +111,27 @@ public interface FactOriginProjectMainDailyDao extends BaseDao<FactOriginProject
* @return java.lang.Integer
* @param customerId
* @param gridId
* @param communityId
* @param closedStatus
* @author yinzuomei
* @description 具体某个网格内的项目
* @description 具体某个网格或者社区内的项目
* @Date 2020/9/23 18:18
**/
Integer getGridClosedProjectTotal(@Param("customerId")String customerId, @Param("gridId") String gridId, @Param("closedStatus") String closedStatus);
Integer getGridOrCommunityClosedProjectTotal(@Param("customerId")String customerId,
@Param("gridId") String gridId,
@Param("communityId") String communityId,
@Param("closedStatus") String closedStatus);
/**
* @return int
* @param customerId
* @param agencyPath
* @param closedStatus
* @author yinzuomei
* @description 组织下已解决项目 or 已结案项目总数
* @Date 2020/9/24 17:38
**/
int getAgencyClosedProjectTotal(@Param("customerId") String customerId,
@Param("agencyPath")String agencyPath,
@Param("closedStatus")String closedStatus);
}

25
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginTopicMainDailyDao.java

@ -19,7 +19,6 @@ package com.epmet.dao.evaluationindex.extract;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.result.CreateTopicCountResultDTO;
import com.epmet.dto.topic.TopicOriginInfoDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginTopicMainDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -80,29 +79,41 @@ public interface FactOriginTopicMainDailyDao extends BaseDao<FactOriginTopicMain
/**
* @return int
* @param customerId
* @param partyMemberUserIds
* @author yinzuomei
* @description 党员提出的话题总数
* @Date 2020/9/23 13:46
**/
int selectPublishedByPartyTopicCount(@Param("customerId") String customerId, @Param("list") List<String> partyMemberUserIds);
int selectPublishedByPartyTopicCount(@Param("customerId") String customerId,
@Param("gridId")String gridId,
@Param("agencyId")String agencyId);
/**
* @return int
* @param customerId
* @param gridId
* @return int
* @author yinzuomei
* @description 具体某个网格的话题数
* @Date 2020/9/23 14:23
**/
int selectGridTopicTotalByGrid(@Param("customerId")String customerId, @Param("gridId")String gridId);
int selectGridOrCommunityTopicTotal(@Param("customerId") String customerId, @Param("gridId") String gridId, @Param("agencyId") String agencyId);
/**
* @return void
* @param list
* @author yinzuomei
* @description 更新话题主表的TOPIC_STATUS , CLOSED_STATUS
* @Date 2020/9/23 17:59
**/
void updateFactOriginTopicMain(@Param("list") List<TopicOriginInfoDTO> list);
void updateFactOriginTopicMain(@Param("topicId")String topicId,@Param("topicStatus")String topicStatus,@Param("closedStatus")String closedStatus);
/**
* @return java.lang.Integer
* @param customerId
* @param agencyPath
* @author yinzuomei
* @description
* @Date 2020/9/24 15:53
**/
Integer getAgencyPartyTopicTotal(@Param("customerId") String customerId,
@Param("agencyPath")String agencyPath,
@Param("createTopicUserIsParty") String createTopicUserIsParty);
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySelfSubScoreDao.java

@ -35,5 +35,5 @@ public interface AgencySelfSubScoreDao extends BaseDao<AgencySelfSubScoreEntity>
int insertBatch(@Param("list") List<AgencySelfSubScoreEntity> list);
int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("parentIndexCode") String parentIndexCode);
int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("dataType") String dataType, @Param("parentIndexCode") String parentIndexCode);
}

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java

@ -52,5 +52,6 @@ public interface AgencySubScoreDao extends BaseDao<AgencyScoreEntity> {
*/
Integer deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("dataType") String dataType, @Param("delNum") Integer delNum);
List<AgencySubScoreEntity> selectSubListByPath(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("levelIndexPath") String levelIndexPath);
List<AgencySubScoreEntity> selectSubListByPath(@Param("customerId") String customerId, @Param("monthId") String monthId,
@Param("dataType") String dataType, @Param("allIndexCodePath") String allIndexCodePath);
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySelfSubScoreDao.java

@ -33,7 +33,7 @@ import java.util.List;
@Mapper
public interface CommunitySelfSubScoreDao extends BaseDao<CommunitySelfSubScoreEntity> {
int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode);
int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("parentIndexCode") String parentIndexCode);
int insertBatch(@Param("list") List<CommunitySelfSubScoreEntity> communitySelfSubScoreEntities);
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java

@ -52,5 +52,5 @@ public interface CommunitySubScoreDao extends BaseDao<FactIndexCommunitySubScore
Integer deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("delNum") Integer delNum);
List<FactIndexCommunitySubScoreEntity> selectSubListByPath(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("levelIndexPath") String levelIndexPath);
List<FactIndexCommunitySubScoreEntity> selectSubListByPath(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allIndexCodePath") String allIndexCodePath);
}

39
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSelfSubScoreDao.java

@ -0,0 +1,39 @@
/**
* 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.indexcal;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.evaluationindex.indexcal.DeptSelfSubScoreEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 社区相关 自身/下级分数表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-09-21
*/
@Mapper
public interface DeptSelfSubScoreDao extends BaseDao<DeptSelfSubScoreEntity> {
int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("parentIndexCode") String parentIndexCode);
int insertBatch(@Param("list") List<DeptSelfSubScoreEntity> deptSelfSubScoreEntities);
}

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSubScoreDao.java

@ -22,7 +22,6 @@ import com.epmet.entity.evaluationindex.indexcal.DeptSubScoreEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import javax.annotation.security.PermitAll;
import java.util.List;
/**
@ -54,7 +53,9 @@ public interface DeptSubScoreDao extends BaseDao<DeptSubScoreEntity> {
* @Date 2020/9/10 12:28
**/
int deleteBatches(@Param("customerId") String customerId,
@Param("monthId") String monthId,
@Param("allParentIndexCode") String allParentIndexCode,
@Param("deleteSize") Integer deleteSize);
@Param("monthId") String monthId,
@Param("allParentIndexCode") String allParentIndexCode,
@Param("deleteSize") Integer deleteSize);
List<DeptSubScoreEntity> selectSubListByPath(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allIndexCodePath") String allIndexCodePath);
}

25
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java

@ -104,21 +104,6 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao<FactIndexGov
**/
String selectTheOneGrid(CalculateCommonFormDTO formDTO);
/**
* @Description 查询全部网格信息
* @param customerId
* @author zxc
* @date 2020/9/18 10:47 上午
*/
List<GovernAbilityGridMonthlyFormDTO> selectAllGridInfo(String customerId);
/**
* @Description 查询全部网格信息
* @param customerId
* @author zxc
* @date 2020/9/19 10:50 上午
*/
List<PartyAbilityGridMonthlyFormDTO> selectAllGridInfoToParty(String customerId);
/**
* @Description 批量插入治理能力
* @param lists
@ -135,4 +120,14 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao<FactIndexGov
* @date 2020/9/19 4:31 下午
*/
Integer deleteOldGovernAbilityRecord(@Param("customerId")String customerId,@Param("monthId")String monthId);
/**
* 查询客户下网格治理能力
* @author zhaoqifeng
* @date 2020/9/24 15:26
* @param customerId
* @param monthId
* @return java.util.List<com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity>
*/
List<FactIndexGovrnAblityGridMonthlyEntity> selectGridByCustomer(@Param("customerId")String customerId, @Param("monthId")String monthId);
}

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java

@ -85,4 +85,12 @@ public interface ScreenCpcBaseDataDao extends BaseDao<ScreenCpcBaseDataEntity> {
* @date 2020/9/23 2:01 下午
*/
List<PartyInfoResultDTO> selectPartyInfo(@Param("customerId") String customerId,@Param("dateId") String dateId, String agencyId);
/**
* @Description 查询党员信息直属网格的
* @param gridIds
* @author zxc
* @date 2020/9/24 3:23 下午
*/
List<PartyInfoResultDTO> selectDirectGridPartyInfo(@Param("gridIds") List<String> gridIds,@Param("customerId") String customerId,@Param("dateId") String dateId);
}

19
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java

@ -19,7 +19,9 @@ package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.form.PartyBaseInfoFormDTO;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.CustomerAgencyInfoResultDTO;
import com.epmet.dto.extract.result.OrgNameResultDTO;
import com.epmet.dto.screen.result.TreeResultDTO;
import com.epmet.dto.screencoll.form.CustomerAgencyFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity;
@ -152,4 +154,21 @@ public interface ScreenCustomerAgencyDao extends BaseDao<ScreenCustomerAgencyEnt
* @date 2020/9/23 3:10 下午
*/
List<PartyBaseInfoFormDTO> selectAllAgencyIdToParty(@Param("customerId")String customerId,@Param("dateId")String dateId);
/**
* @Description 查询客户下所有机关ID
* @Param customerId
* @Param monthId
* @author zxc
* @date 2020/9/25 10:39 上午
*/
List<ScreenPartyLinkMassesDataFormDTO> selectAllAgencyIdToPartyLinkMessage(String customerId, String monthId);
/**
* @Description 查询org名称机关
* @param agencyIds
* @author zxc
* @date 2020/9/24 1:27 下午
*/
List<OrgNameResultDTO> selectOrgNameAgency(@Param("agencyIds") List<String> agencyIds);
}

46
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java

@ -19,7 +19,12 @@ package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ScreenCustomerGridDTO;
import com.epmet.dto.extract.form.GovernAbilityGridMonthlyFormDTO;
import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO;
import com.epmet.dto.extract.form.PartyBaseInfoFormDTO;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.extract.result.GridInfoResultDTO;
import com.epmet.dto.extract.result.OrgNameResultDTO;
import com.epmet.dto.indexcal.PageQueryGridFormDTO;
import com.epmet.dto.screencoll.form.CustomerGridFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity;
@ -138,4 +143,45 @@ public interface ScreenCustomerGridDao extends BaseDao<ScreenCustomerGridEntity>
* @date 2020/9/23 3:10 下午
*/
List<PartyBaseInfoFormDTO> selectAllGridIdToParty(String customerId, String dateId);
/**
* @Description 查询客户下所有网格ID
* @Param customerId
* @Param monthId
* @author zxc
* @date 2020/9/25 10:43 上午
*/
List<ScreenPartyLinkMassesDataFormDTO> selectAllGridIdToPartyLinkMessage(@Param("customerId") String customerId,@Param("monthId") String monthId);
/**
* @Description 查询org名称
* @param gridIds
* @author zxc
* @date 2020/9/24 1:27 下午
*/
List<OrgNameResultDTO> selectOrgName(@Param("gridIds") List<String> gridIds);
/**
* @Description 查询机关的直属网格
* @param agencyIds
* @author zxc
* @date 2020/9/24 2:33 下午
*/
List<GridInfoResultDTO> selectDirectGrid(@Param("agencyIds") List<String> agencyIds);
/**
* @Description 查询全部网格信息
* @param customerId
* @author zxc
* @date 2020/9/19 10:50 上午
*/
List<PartyAbilityGridMonthlyFormDTO> selectAllGridInfoToParty(String customerId);
/**
* @Description 查询全部网格信息
* @param customerId
* @author zxc
* @date 2020/9/18 10:47 上午
*/
List<GovernAbilityGridMonthlyFormDTO> selectAllGridInfo(@Param("customerId") String customerId);
}

19
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java

@ -56,4 +56,23 @@ public interface ScreenGovernRankDataDao extends BaseDao<ScreenGovernRankDataEnt
* @Date 10:52 2020-08-18
**/
void batchInsertGovernRankData(@Param("list") List<GovernRankDataFormDTO> list, @Param("customerId")String customerId);
/**
* 组织级别初始化数据
* @author zhaoqifeng
* @date 2020/9/24 14:52
* @param customerId
* @param level
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenGovernRankDataEntity>
*/
List<ScreenGovernRankDataEntity> initAgencyDataList(@Param("customerId") String customerId, @Param("level") String level);
/**
* 网格级别初始化数据
* @author zhaoqifeng
* @date 2020/9/24 14:52
* @param customerId
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenGovernRankDataEntity>
*/
List<ScreenGovernRankDataEntity> initGridDataList(@Param("customerId") String customerId);
}

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java

@ -18,6 +18,7 @@
package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.form.ScreenPartyBranchDataFormDTO;
import com.epmet.dto.screencoll.form.PartyBranchDataFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenPartyBranchDataEntity;
import org.apache.ibatis.annotations.Mapper;
@ -56,4 +57,12 @@ public interface ScreenPartyBranchDataDao extends BaseDao<ScreenPartyBranchDataE
* @Date 10:52 2020-08-18
**/
void batchInsertPartyBranchData(@Param("list") List<PartyBranchDataFormDTO> list, @Param("customerId")String customerId);
/**
* @Description 插入建设情况数据
* @param lists
* @author zxc
* @date 2020/9/25 9:16 上午
*/
void insertScreenPartyBranchData(@Param("lists") List<ScreenPartyBranchDataFormDTO> lists);
}

29
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java

@ -18,6 +18,7 @@
package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.form.ScreenPartyLinkMassesDataFormDTO;
import com.epmet.dto.screencoll.form.PartyLinkMassesDataFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenPartyLinkMassesDataEntity;
import org.apache.ibatis.annotations.Mapper;
@ -55,4 +56,32 @@ public interface ScreenPartyLinkMassesDataDao extends BaseDao<ScreenPartyLinkMas
* @Date 10:52 2020-08-18
**/
void batchInsertPartyLinkMassesData(@Param("list") List<PartyLinkMassesDataFormDTO> list, @Param("customerId")String customerId);
/**
* @Description 批量插入党员联系群众数据
* @param lists
* @author zxc
* @date 2020/9/24 6:06 下午
*/
void insertScreenPartyLinkMassesData(@Param("lists")List<ScreenPartyLinkMassesDataFormDTO> lists);
/**
* @Description 删除旧的党员联系群众
* @param customerId
* @param monthId
* @param orgIds
* @author zxc
* @date 2020/9/22 3:28 下午
*/
Integer deleteOldPartyLinkInfo(@Param("customerId") String customerId,@Param("monthId") String monthId,@Param("orgIds") List<String> orgIds);
/**
* @Description 查询党员联系群众信息
* @Param customerId
* @Param monthId
* @Param agencyId
* @author zxc
* @date 2020/9/25 1:19 下午
*/
List<ScreenPartyLinkMassesDataFormDTO> selectPartyLinkMassesInfo(@Param("customerId")String customerId,@Param("monthId") String monthId,@Param("agencyId") String agencyId);
}

32
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java

@ -43,10 +43,24 @@ public interface ScreenPioneerDataDao extends BaseDao<ScreenPioneerDataEntity> {
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Integer deletePioneerDataByCustomerId(@Param("customerId") String customerId,
@Param("deleteSize") Integer deleteSize);
/**
* @return java.lang.Integer
* @param customerId
* @param orgType
* @param deleteSize
* @param orgIds
* @author yinzuomei
* @description 产品客户采集用删除方法
* @Date 2020/9/24 14:59
**/
Integer deletePioneerData(@Param("customerId") String customerId,
@Param("orgType") String orgType,
@Param("dataEndTime")String dataEndTime,
@Param("deleteSize") Integer deleteSize);
@Param("deleteSize") Integer deleteSize,
@Param("orgIds")List<String> orgIds);
/**
* 10党建引领-先锋模范数据
@ -71,12 +85,20 @@ public interface ScreenPioneerDataDao extends BaseDao<ScreenPioneerDataEntity> {
/**
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity>
* @param customerId
* @param agencyLevel
* @author yinzuomei
* @description 初始化好orgType="agency"的插入对象
* @description 初始化好社区, orgType="agency"的插入对象
* @Date 2020/9/22 15:03
**/
List<ScreenPioneerDataEntity> initAgencyPioneerDataList(@Param("customerId")String customerId, @Param("agencyLevel")String agencyLevel);
List<ScreenPioneerDataEntity> initCommunityPioneerDataList(@Param("customerId")String customerId);
/**
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity>
* @param customerId
* @author yinzuomei
* @description 初始化好非社区的, orgType="agency"的插入对象
* @Date 2020/9/24 13:45
**/
List<ScreenPioneerDataEntity> initExceptCommunityPioneerDataList(@Param("customerId")String customerId);
/**
* @return void

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java

@ -55,4 +55,6 @@ public interface ScreenUserTotalDataDao extends BaseDao<ScreenUserTotalDataEntit
* @Date 10:52 2020-08-18
**/
void batchInsertUserTotalData(@Param("list") List<UserTotalDataFormDTO> list, @Param("customerId")String customerId);
void insertBatch(@Param("list") List<ScreenUserTotalDataEntity> list);
}

22
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/DimCustomerPartymemberDao.java

@ -76,8 +76,28 @@ public interface DimCustomerPartymemberDao extends BaseDao<DimCustomerPartymembe
* @param customerId
* @param gridId
* @author yinzuomei
* @description
* @description 网格内注册的党员
* @Date 2020/9/23 14:20
**/
List<String> selectGridPartyMemberUserIds(@Param("customerId") String customerId, @Param("gridId")String gridId);
/**
* @return java.util.List<java.lang.String>
* @param customerId
* @param communityId
* @author yinzuomei
* @description 社区内注册的党员
* @Date 2020/9/24 10:22
**/
List<String> selectCommunityPartyMemberUserIds(@Param("customerId") String customerId, @Param("communityId")String communityId);
/**
* @return java.util.List<java.lang.String>
* @param customerId
* @param pids
* @author yinzuomei
* @description 根据pids查询党员
* @Date 2020/9/24 14:31
**/
List<String> selectPartyMemberUserIdsByPids(@Param("customerId") String customerId, @Param("pids")String pids);
}

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java

@ -19,8 +19,10 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.project.form.MonthProjectListFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity;
import com.epmet.entity.stats.FactAgencyProjectDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -46,4 +48,16 @@ public interface FactAgencyProjectDailyDao extends BaseDao<FactAgencyProjectDail
* @Description 根据客户Id日维度Id批量物理删除一下可能存在的历史数据
**/
void delDateProject(FactAgencyProjectDailyEntity delEntity);
/**
* @Description 根据机关类型查询项目数据
* @param orgLevel
* @param customerId
* @param dateId
* @return
* @author wangc
* @date 2020.09.24 17:19
**/
List<ScreenUserTotalDataEntity> selectProjectCountByOrgLevel(@Param("orgLevel") String orgLevel, @Param("customerId") String customerId, @Param("dateId")String dateId );
}

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactGroupGridDailyDao.java

@ -19,11 +19,13 @@ package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.group.result.GroupGridDailyResultDTO;
import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity;
import com.epmet.entity.stats.FactGroupGridDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* -网格日统计数据
@ -47,5 +49,15 @@ public interface FactGroupGridDailyDao extends BaseDao<FactGroupGridDailyEntity>
* @author zxc
*/
void deleteInsertDateId(@Param("dateId")String dateId,@Param("customerId")String customerId);
/**
* @Description 根据机关级别查询小组数据
* @param orgLevel
* @param customerId
* @param dateId
* @return
* @author wangc
* @date 2020.09.24 16:19
**/
List<ScreenUserTotalDataEntity> selectGroupCountByOrgLevel(@Param("orgLevel") String orgLevel, @Param("customerId") String customerId, @Param("dateId")String dateId);
}

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactIssueGridDailyDao.java

@ -18,10 +18,13 @@
package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity;
import com.epmet.entity.stats.FactIssueGridDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 网格议题数量(按日)
*
@ -39,5 +42,16 @@ public interface FactIssueGridDailyDao extends BaseDao<FactIssueGridDailyEntity>
* @return void
*/
void deleteByCustomerId(@Param("customerId") String customerId, @Param("dateId") String dateId);
/**
* @Description 根据机关类型查询议题数据
* @param orgLevel
* @param customerId
* @param dateId
* @return
* @author wangc
* @date 2020.09.24 17:19
**/
List<ScreenUserTotalDataEntity> selectIssueCountByOrgLevel(@Param("orgLevel") String orgLevel, @Param("customerId") String customerId, @Param("dateId")String dateId );
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/topic/FactTopicTotalGridDailyDao.java

@ -19,6 +19,7 @@ package com.epmet.dao.stats.topic;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.stats.topic.FactTopicTotalGridDailyDTO;
import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity;
import com.epmet.entity.stats.topic.FactTopicTotalGridDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -36,4 +37,15 @@ public interface FactTopicTotalGridDailyDao extends BaseDao<FactTopicTotalGridDa
void insertBatch(@Param("list") List<FactTopicTotalGridDailyDTO> list);
void deleteByParams(@Param("dateId")String dateId,@Param("customerId")String customerId);
/**
* @Description 根据机关类型查询话题数据
* @param orgLevel
* @param customerId
* @param dateId
* @return
* @author wangc
* @date 2020.09.24 17:19
**/
List<ScreenUserTotalDataEntity> selectTopicCountByOrgLevel(@Param("orgLevel") String orgLevel, @Param("customerId") String customerId, @Param("dateId")String dateId );
}

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/user/FactParticipationUserGridDailyDao.java

@ -20,6 +20,7 @@ package com.epmet.dao.stats.user;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.result.UserCountResultDTO;
import com.epmet.dto.stats.user.FactParticipationUserGridDailyDTO;
import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity;
import com.epmet.entity.stats.user.FactParticipationUserGridDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -48,4 +49,12 @@ public interface FactParticipationUserGridDailyDao extends BaseDao<FactParticipa
*/
List<UserCountResultDTO> selectUserCount(String customerId, String dateId);
/**
* @Description 根据机构级别查询用户数与党员数
* @param orgLevel
* @return
* @author wangc
* @date 2020.09.24 14:59
**/
List<ScreenUserTotalDataEntity> selectUserAndPartymemberByOrgLevel(@Param("orgLevel") String orgLevel,@Param("customerId") String customerId, @Param("dateId")String dateId);
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java

@ -96,4 +96,9 @@ public class AgencySubScoreEntity extends BaseEpmetEntity {
* 权重同一组权重总和=1
*/
private BigDecimal weight;
/**
* 所有指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
}

100
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSelfSubScoreEntity.java

@ -0,0 +1,100 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity.evaluationindex.indexcal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
/**
* 区直部门相关 自身/下级分数表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-09-23
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("fact_index_dept_self_sub_score")
public class DeptSelfSubScoreEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 部门id
*/
private String deptId;
/**
* 组织id
*/
private String agencyId;
/**
* 年度ID: yyyy
*/
private String yearId;
/**
* 季度id: yyyyQ1yyyyQ2yyyyQ3yyyyQ4
*/
private String quarterId;
/**
* 月维度Id: yyyyMM
*/
private String monthId;
/**
* 自身指标得分
*/
private BigDecimal selfScore;
/**
* 下级指标得分
*/
private BigDecimal subScore;
/**
* 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli
*/
private String parentIndexCode;
/**
* 所有指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
/**
* 自身指标权重
*/
private BigDecimal selfWeight;
/**
* 下级指标权重
*/
private BigDecimal subWeight;
}

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java

@ -117,4 +117,11 @@ public class ScreenPioneerDataEntity extends BaseEpmetEntity {
*/
private String dataEndTime;
/**
*
*/
private String pid;
private String agencyPids;
private String agencyPath;
}

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java

@ -15,6 +15,7 @@ import com.epmet.service.evaluationindex.extract.todata.*;
import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyService;
import com.epmet.service.evaluationindex.screen.ScreenCustomerGridService;
import com.epmet.service.heart.ActInfoService;
import com.epmet.service.partymember.PartyMemberService;
import com.epmet.service.stats.FactArticlePublishedGridDailyService;
@ -74,6 +75,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
private UserService userService;
@Autowired
private PartyMemberService partyMemberService;
@Autowired
private ScreenCustomerGridService gridService;
/**
* @Description 计算网格指标党建能力
@ -84,7 +87,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
*/
@Override
public Boolean calGridIndexPartyAbility(String customerId, String monthId) {
List<PartyAbilityGridMonthlyFormDTO> result = governAbilityDao.selectAllGridInfoToParty(customerId);
List<PartyAbilityGridMonthlyFormDTO> result = gridService.selectAllGridInfoToParty(customerId);
if (CollectionUtils.isEmpty(result)){
log.warn(String.format(ExtractConstant.CUSTOMER_INFO_NULL,customerId));
return true;
@ -239,7 +242,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
@Override
public Boolean calGridIndexGovernAbility(String customerId, String monthId) {
List<GovernAbilityGridMonthlyFormDTO> result = governAbilityDao.selectAllGridInfo(customerId);
List<GovernAbilityGridMonthlyFormDTO> result = gridService.selectAllGridInfo(customerId);
if (CollectionUtils.isEmpty(result)){
log.warn(String.format(ExtractConstant.CUSTOMER_INFO_NULL,customerId));
return true;

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

Loading…
Cancel
Save