Browse Source

Merge remote-tracking branch 'remotes/origin/dev_screen_data'

feature/evaluate
jianjun 5 years ago
parent
commit
4f08bccf57
  1. 36
      epmet-admin/epmet-admin-server/pom.xml
  2. 43
      epmet-auth/pom.xml
  3. 119
      epmet-gateway/pom.xml
  4. 3
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java
  5. 44
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AnNingSubAgencyIndexRankFormDTO.java
  6. 55
      epmet-module/data-report/data-report-server/pom.xml
  7. 9
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java
  8. 20
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java
  9. 15
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java
  10. 17
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java
  11. 15
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java
  12. 9
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java
  13. 19
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java
  14. 25
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
  15. 25
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml
  16. 20
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java
  17. 14
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java
  18. 30
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityDataFormDTO.java
  19. 30
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityDataFormDTO.java
  20. 30
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityDataFormDTO.java
  21. 4
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java
  22. 2
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataFormDTO.java
  23. 28
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityDataFormDTO.java
  24. 30
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityDataFormDTO.java
  25. 30
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityDataFormDTO.java
  26. 29
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityDataFormDTO.java
  27. 6
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityScoreDTO.java
  28. 48
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java
  29. 25
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataListFormDTO.java
  30. 25
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyListFormDTO.java
  31. 24
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptListFormDTO.java
  32. 24
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridListFormDTO.java
  33. 2
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java
  34. 28
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataListFormDTO.java
  35. 29
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataListFormDTO.java
  36. 29
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataListMonthlyFormDTO.java
  37. 29
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataListYearlyFormDTO.java
  38. 29
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataListFormDTO.java
  39. 29
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataListFormDTO.java
  40. 24
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataListFormDTO.java
  41. 24
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataListFormDTO.java
  42. 25
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataListFormDTO.java
  43. 25
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PublicPartiTotalDataListFormDTO.java
  44. 29
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinListFormDTO.java
  45. 24
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserTotalDataListFormDTO.java
  46. 99
      epmet-module/data-statistical/data-statistical-server/pom.xml
  47. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java
  48. 22
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java
  49. 18
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java
  50. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/KcScreenCollController.java
  51. 75
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ShiBeiScreenCollController.java
  52. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java
  53. 107
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencySubScoreDao.java
  54. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java
  55. 105
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java
  56. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java
  57. 87
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcSubScoreDao.java
  58. 92
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptSubScoreDao.java
  59. 43
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java
  60. 57
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridSubScoreDao.java
  61. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java
  62. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java
  63. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java
  64. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java
  65. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java
  66. 17
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java
  67. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java
  68. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java
  69. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
  70. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java
  71. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java
  72. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java
  73. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java
  74. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java
  75. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java
  76. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java
  77. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java
  78. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java
  79. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java
  80. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java
  81. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java
  82. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java
  83. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java
  84. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java
  85. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java
  86. 90
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java
  87. 17
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java
  88. 90
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java
  89. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java
  90. 90
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java
  91. 23
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java
  92. 95
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java
  93. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java
  94. 23
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java
  95. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java
  96. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java
  97. 84
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java
  98. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java
  99. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java
  100. 171
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java

36
epmet-admin/epmet-admin-server/pom.xml

@ -84,12 +84,41 @@
<profiles> <profiles>
<profile> <profile>
<id>dev</id> <id>dev</id>
<properties>
<server.port>8082</server.port>
<spring.profiles.active>dev</spring.profiles.active>
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_admin?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet_admin_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled>
<nacos.server-addr>192.168.1.130:8848</nacos.server-addr>
<nacos.discovery.namespace>6ceab336-d004-4acf-89c6-e121d06f4988</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
</properties>
</profile>
<profile>
<id>local</id>
<activation> <activation>
<activeByDefault>true</activeByDefault> <activeByDefault>true</activeByDefault>
</activation> </activation>
<properties> <properties>
<server.port>8082</server.port> <server.port>8082</server.port>
<spring.profiles.active>dev</spring.profiles.active> <spring.profiles.active>local</spring.profiles.active>
<!-- 数据库配置--> <!-- 数据库配置-->
<spring.datasource.druid.url> <spring.datasource.druid.url>
@ -103,7 +132,7 @@
<spring.redis.port>6379</spring.redis.port> <spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password> <spring.redis.password>123456</spring.redis.password>
<!-- nacos --> <!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled> <nacos.register-enabled>false</nacos.register-enabled>
<nacos.server-addr>192.168.1.130:8848</nacos.server-addr> <nacos.server-addr>192.168.1.130:8848</nacos.server-addr>
<nacos.discovery.namespace>6ceab336-d004-4acf-89c6-e121d06f4988</nacos.discovery.namespace> <nacos.discovery.namespace>6ceab336-d004-4acf-89c6-e121d06f4988</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace> <nacos.config.namespace></nacos.config.namespace>
@ -116,9 +145,6 @@
</profile> </profile>
<profile> <profile>
<id>test</id> <id>test</id>
<!--<activation>
<activeByDefault>true</activeByDefault>
</activation>-->
<properties> <properties>
<server.port>8082</server.port> <server.port>8082</server.port>
<spring.profiles.active>test</spring.profiles.active> <spring.profiles.active>test</spring.profiles.active>

43
epmet-auth/pom.xml

@ -156,9 +156,6 @@
<profiles> <profiles>
<profile> <profile>
<id>dev</id> <id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties> <properties>
<server.port>8081</server.port> <server.port>8081</server.port>
<spring.profiles.active>dev</spring.profiles.active> <spring.profiles.active>dev</spring.profiles.active>
@ -192,12 +189,46 @@
<gov.wx.ma.secret>e5e72147737cfeb2b0f3a43624cadb3f</gov.wx.ma.secret>--> <gov.wx.ma.secret>e5e72147737cfeb2b0f3a43624cadb3f</gov.wx.ma.secret>-->
</properties> </properties>
</profile> </profile>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<server.port>8081</server.port>
<spring.profiles.active>local</spring.profiles.active>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>false</nacos.register-enabled>
<nacos.server-addr>192.168.1.130:8848</nacos.server-addr>
<nacos.discovery.namespace>6ceab336-d004-4acf-89c6-e121d06f4988</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<!--公众号配置-->
<wx.mp.configs.appId>wxcb6ce2ed0c5ae54c</wx.mp.configs.appId>
<wx.mp.configs.secret>c7f74941ee97fa9b2e1065772d34c397</wx.mp.configs.secret>
<wx.mp.configs.token>12345678Yzm</wx.mp.configs.token>
<wx.mp.configs.aesKey>jiKrJoPQsUIP9ayAwmuJQeAVPBjFOh5D1JxFDd7ZSU3</wx.mp.configs.aesKey>
<!--居民端小程序配置-->
<resi.wx.ma.appId>wx07674c23af51b521</resi.wx.ma.appId>
<resi.wx.ma.secret>a2fd0d29b007cbbcf8c8dda8c693d99b</resi.wx.ma.secret>
<!--政府端小程序配置-->
<gov.wx.ma.appId>wx3d1372029eb816a3</gov.wx.ma.appId>
<gov.wx.ma.secret>651f02d71ed3f123dfb584b8bf0f4d8b</gov.wx.ma.secret>
<!--<gov.wx.ma.appId>wx2679392c4cc2af22</gov.wx.ma.appId>
<gov.wx.ma.secret>e5e72147737cfeb2b0f3a43624cadb3f</gov.wx.ma.secret>-->
</properties>
</profile>
<profile> <profile>
<id>test</id> <id>test</id>
<!--<activation>
<activeByDefault>true</activeByDefault>
</activation>-->
<properties> <properties>
<server.port>8081</server.port> <server.port>8081</server.port>
<spring.profiles.active>test</spring.profiles.active> <spring.profiles.active>test</spring.profiles.active>

119
epmet-gateway/pom.xml

@ -87,9 +87,6 @@
<profiles> <profiles>
<profile> <profile>
<id>dev</id> <id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties> <properties>
<server.port>8080</server.port> <server.port>8080</server.port>
@ -201,6 +198,122 @@
<!-- <gateway.routes.epmet-ext-server.url>http://127.0.0.1:8113</gateway.routes.epmet-ext-server.url>--> <!-- <gateway.routes.epmet-ext-server.url>http://127.0.0.1:8113</gateway.routes.epmet-ext-server.url>-->
</properties> </properties>
</profile> </profile>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<server.port>8080</server.port>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>false</nacos.register-enabled>
<nacos.server-addr>192.168.1.130:8848</nacos.server-addr>
<nacos.discovery.namespace>6ceab336-d004-4acf-89c6-e121d06f4988</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip></nacos.ip>
<!-- gateway routes -->
<!-- 1、认证服务 -->
<!-- <gateway.routes.epmet-auth-server.uri>http://localhost:8081</gateway.routes.epmet-auth-server.uri>-->
<gateway.routes.epmet-auth-server.uri>lb://epmet-auth-server</gateway.routes.epmet-auth-server.uri>
<!-- 2、Admin服务 -->
<gateway.routes.epmet-admin-server.uri>lb://epmet-admin-server</gateway.routes.epmet-admin-server.uri>
<!-- 4、OSS服务 -->
<gateway.routes.epmet-oss-server.uri>lb://epmet-oss-server</gateway.routes.epmet-oss-server.uri>
<!-- 5、消息服务 -->
<gateway.routes.epmet-message-server.uri>lb://epmet-message-server</gateway.routes.epmet-message-server.uri>
<!-- 6、工作流服务 -->
<gateway.routes.epmet-activiti-server.uri>lb://epmet-activiti-server</gateway.routes.epmet-activiti-server.uri>
<!-- 7、定时任务服务 -->
<gateway.routes.epmet-job-server.uri>lb://epmet-job-server</gateway.routes.epmet-job-server.uri>
<!-- <gateway.routes.epmet-job-server.uri>http://localhost:8084</gateway.routes.epmet-job-server.uri>-->
<!-- 8、用户模块 -->
<!-- <gateway.routes.epmet-user-server.uri>http://localhost:8087</gateway.routes.epmet-user-server.uri>-->
<gateway.routes.epmet-user-server.uri>lb://epmet-user-server</gateway.routes.epmet-user-server.uri>
<!-- 9、新模块结构demo -->
<gateway.routes.epmet-demo-server.uri>lb://epmet-demo-server</gateway.routes.epmet-demo-server.uri>
<!-- 10、运营端客户定制化服务 -->
<gateway.routes.oper-customize-server.uri>lb://oper-customize-server</gateway.routes.oper-customize-server.uri>
<!-- 11、运营端客户定制化服务 -->
<gateway.routes.oper-crm-server.uri>lb://oper-crm-server</gateway.routes.oper-crm-server.uri>
<!--<gateway.routes.oper-crm-server.uri>http://localhost:8090</gateway.routes.oper-crm-server.uri>-->
<!-- 12、居民端陌生人导览 -->
<gateway.routes.resi-guide-server.uri>lb://resi-guide-server</gateway.routes.resi-guide-server.uri>
<!-- 13、政府组织管理 -->
<!-- <gateway.routes.gov-org-server.uri>http://localhost:8092</gateway.routes.gov-org-server.uri>-->
<gateway.routes.gov-org-server.uri>lb://gov-org-server</gateway.routes.gov-org-server.uri>
<!-- 14、#运营端访问权限控制 -->
<!-- <gateway.routes.oper-access-server.uri>http://localhost:8093</gateway.routes.oper-access-server.uri>-->
<gateway.routes.oper-access-server.uri>lb://oper-access-server</gateway.routes.oper-access-server.uri>
<!-- 15、居民端个人信息 -->
<!-- <gateway.routes.resi-mine-server.uri>http://localhost:8094</gateway.routes.resi-mine-server.uri>-->
<gateway.routes.resi-mine-server.uri>lb://resi-mine-server</gateway.routes.resi-mine-server.uri>
<!-- 16、居民端楼院校组 -->
<!-- <gateway.routes.resi-group-server.uri>http://localhost:8095</gateway.routes.resi-group-server.uri>-->
<gateway.routes.resi-group-server.uri>lb://resi-group-server</gateway.routes.resi-group-server.uri>
<!-- 17、党员认证、热心居民申请 -->
<!-- <gateway.routes.resi-partymember-server.uri>http://localhost:8096</gateway.routes.resi-partymember-server.uri>-->
<gateway.routes.resi-partymember-server.uri>lb://resi-partymember-server</gateway.routes.resi-partymember-server.uri>
<!-- 18、政府端网格管理 -->
<!-- <gateway.routes.gov-grid-server.uri>http://localhost:8097</gateway.routes.gov-grid-server.uri>-->
<gateway.routes.gov-grid-server.uri>lb://gov-grid-server</gateway.routes.gov-grid-server.uri>
<!--19.政府端-权限-服务-->
<gateway.routes.gov-access-server.uri>lb://gov-access-server</gateway.routes.gov-access-server.uri>
<!--20.政府端-我的-服务-->
<!-- <gateway.routes.gov-mine-server.uri>http://localhost:8098</gateway.routes.gov-mine-server.uri>-->
<gateway.routes.gov-mine-server.uri>lb://gov-mine-server</gateway.routes.gov-mine-server.uri>
<!-- 21、居民端党群e事 -->
<gateway.routes.resi-hall-server.uri>lb://resi-hall-server</gateway.routes.resi-hall-server.uri>
<!-- 22、政府工作端议题管理 -->
<!-- <gateway.routes.gov-issue-server.uri>http://localhost:8101</gateway.routes.gov-issue-server.uri>-->
<gateway.routes.gov-issue-server.uri>lb://gov-issue-server</gateway.routes.gov-issue-server.uri>
<!-- 23、政府工作端项目管理 -->
<!-- <gateway.routes.gov-project-server.uri>http://localhost:8102</gateway.routes.gov-project-server.uri>-->
<gateway.routes.gov-project-server.uri>lb://gov-project-server</gateway.routes.gov-project-server.uri>
<!-- 24、公共服务 -->
<gateway.routes.common-service-server.uri>lb://common-service-server</gateway.routes.common-service-server.uri>
<!-- 25、党建园地 -->
<gateway.routes.resi-home-server.uri>lb://resi-home-server</gateway.routes.resi-home-server.uri>
<!-- <gateway.routes.resi-home-server.uri>http://localhost:8104</gateway.routes.resi-home-server.uri>-->
<!-- 26、政府端-党建声音 -->
<gateway.routes.gov-voice-server.uri>lb://gov-voice-server</gateway.routes.gov-voice-server.uri>
<!-- <gateway.routes.gov-voice-server.uri>http://localhost:8105</gateway.routes.gov-voice-server.uri>-->
<!-- 27、居民端-党建声音 -->
<gateway.routes.resi-voice-server.uri>lb://resi-voice-server</gateway.routes.resi-voice-server.uri>
<!-- <gateway.routes.resi-voice-server.uri>http://localhost:8106</gateway.routes.resi-voice-server.uri>-->
<!-- 28、政府端-数据首页 -->
<gateway.routes.data-report-server.uri>lb://data-report-server</gateway.routes.data-report-server.uri>
<!-- <gateway.routes.data-report-server.uri>http://localhost:8109</gateway.routes.data-report-server.uri>-->
<!-- 29、统计服务 -->
<gateway.routes.data-statistical-server.uri>lb://data-statistical-server</gateway.routes.data-statistical-server.uri>
<!-- <gateway.routes.data-statistical-server.uri>http://localhost:8108</gateway.routes.data-statistical-server.uri>-->
<!-- 30、内容审核服务 -->
<gateway.routes.epmet-openapi-scan.uri>lb://epmet-openapi-scan</gateway.routes.epmet-openapi-scan.uri>
<!-- <gateway.routes.epmet-openapi-scan.uri>http://localhost:8107</gateway.routes.epmet-openapi-scan.uri>-->
<!-- 31、微信第三方平台 -->
<gateway.routes.epmet-third-server.uri>lb://epmet-third-server</gateway.routes.epmet-third-server.uri>
<!-- <gateway.routes.epmet-third-server.uri>http://localhost:8110</gateway.routes.epmet-third-server.uri>-->
<!-- 32、爱心互助 -->
<gateway.routes.epmet-heart-server.url>lb://epmet-heart-server</gateway.routes.epmet-heart-server.url>
<!-- <gateway.routes.epmet-heart-server.url>http://127.0.0.1:8111</gateway.routes.epmet-heart-server.url>-->
<!-- 33、 积分银行 -->
<gateway.routes.epmet-point-server.url>lb://epmet-point-server</gateway.routes.epmet-point-server.url>
<!-- <gateway.routes.epmet-point-server.url>http://127.0.0.1:8112</gateway.routes.epmet-point-server.url>-->
<!-- 34、 开放接口服务 -->
<gateway.routes.epmet-ext-server.url>lb://epmet-ext-server</gateway.routes.epmet-ext-server.url>
<!-- <gateway.routes.epmet-ext-server.url>http://127.0.0.1:8113</gateway.routes.epmet-ext-server.url>-->
</properties>
</profile>
<profile> <profile>
<id>test</id> <id>test</id>
<!--<activation> <!--<activation>

3
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java

@ -16,4 +16,7 @@ public interface ScreenConstant {
String COMMA = ","; String COMMA = ",";
String MONTH_ID = "month";
String YEAR_ID = "year";
} }

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

@ -0,0 +1,44 @@
package com.epmet.evaluationindex.screen.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 5下级部门指数排行安宁数据段用 入参
* @Author zhangyong
* @DateTime 2020/09/08 9:54
*/
@Data
public class AnNingSubAgencyIndexRankFormDTO implements Serializable {
private static final long serialVersionUID = -2920561669035794486L;
public interface SubAgencyIndexRank{}
/**
* 机关ID
*/
@NotBlank(message = "组织id不能为空",groups = {SubAgencyIndexRank.class})
private String agencyId;
/**
* 默认查询前几名
*/
@NotNull(message = "默认查询名次不能为空",groups = {SubAgencyIndexRank.class})
private Integer topNum;
/**
* asc 正序 desc 降序
*/
@NotNull(message = "排序方式不能为空",groups = {SubAgencyIndexRank.class})
private String sort;
/**
* 年度year 月度month
*/
@NotNull(message = "年度、月度不能为空",groups = {SubAgencyIndexRank.class})
private String type;
}

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

@ -102,9 +102,6 @@
<profiles> <profiles>
<profile> <profile>
<id>dev</id> <id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties> <properties>
<server.port>8109</server.port> <server.port>8109</server.port>
<spring.profiles.active>dev</spring.profiles.active> <spring.profiles.active>dev</spring.profiles.active>
@ -152,6 +149,58 @@
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19</dingTalk.robot.secret> <dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19</dingTalk.robot.secret>
</properties> </properties>
</profile> </profile>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<server.port>8109</server.port>
<spring.profiles.active>local</spring.profiles.active>
<!-- 数据库配置-->
<datasource.druid.stats.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_data_statistical?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.stats.url>
<datasource.druid.stats.username>epmet_data_statistical_user</datasource.druid.stats.username>
<datasource.druid.stats.password>EpmEt-db-UsEr</datasource.druid.stats.password>
<!-- 展示用的统计数据库-->
<datasource.druid.statsdisplay.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_data_statistical_display?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.statsdisplay.url>
<datasource.druid.statsdisplay.username>epmet_data_stats_display_user</datasource.druid.statsdisplay.username>
<datasource.druid.statsdisplay.password>EpmEt-db-UsEr</datasource.druid.statsdisplay.password>
<datasource.druid.evaluationIndex.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_evaluation_index?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.evaluationIndex.url>
<datasource.druid.evaluationIndex.username>epmet_evaluation_index_user</datasource.druid.evaluationIndex.username>
<datasource.druid.evaluationIndex.password>EpmEt-db-UsEr</datasource.druid.evaluationIndex.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>false</nacos.register-enabled>
<nacos.server-addr>192.168.1.130:8848</nacos.server-addr>
<nacos.discovery.namespace>6ceab336-d004-4acf-89c6-e121d06f4988</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<!--flyway migration 数据库迁移工具-->
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19</dingTalk.robot.secret>
</properties>
</profile>
<profile> <profile>
<id>test</id> <id>test</id>
<!--<activation> <!--<activation>

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

@ -7,12 +7,15 @@ import com.epmet.datareport.service.evaluationindex.screen.AgencyService;
import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO; import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO;
import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO; import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
/** /**
* 组织相关api * 组织相关api
* *
@ -34,7 +37,11 @@ public class AgencyController {
*/ */
//@ExternalAppRequestAuth //@ExternalAppRequestAuth
@PostMapping("tree") @PostMapping("tree")
public Result<TreeResultDTO> tree(ExternalAppRequestParam externalAppRequestParam){ 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)); return new Result<TreeResultDTO>().ok(agencyService.tree(externalAppRequestParam));
} }

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

@ -3,10 +3,7 @@ package com.epmet.datareport.controller.screen;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.datareport.service.evaluationindex.screen.IndexService; import com.epmet.datareport.service.evaluationindex.screen.IndexService;
import com.epmet.evaluationindex.screen.dto.form.MonthBarchartFormDTO; import com.epmet.evaluationindex.screen.dto.form.*;
import com.epmet.evaluationindex.screen.dto.form.MonthPieChartFormDTO;
import com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO;
import com.epmet.evaluationindex.screen.dto.form.YearAverageIndexFormDTO;
import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResultDTO; import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResultDTO;
import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO; import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO;
import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO; import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO;
@ -84,4 +81,19 @@ public class IndexController {
return new Result<List<SubAgencyIndexRankResultDTO>>().ok(indexService.subAgencyIndexRank(subAgencyIndexRankFormDTO)); return new Result<List<SubAgencyIndexRankResultDTO>>().ok(indexService.subAgencyIndexRank(subAgencyIndexRankFormDTO));
} }
/**
* 5下级部门指数排行安宁数据段用
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankFormDTO>>
* @Author zhangyong
* @Date 09:38 2020-09-08
**/
//@ExternalAppRequestAuth
@PostMapping("dataclient/subagencyindexrank")
public Result<List<SubAgencyIndexRankResultDTO>> anNingSubAgencyIndexRank(@RequestBody AnNingSubAgencyIndexRankFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, AnNingSubAgencyIndexRankFormDTO.SubAgencyIndexRank.class);
return new Result<List<SubAgencyIndexRankResultDTO>>().ok(indexService.anNingSubAgencyIndexRank(formDTO));
}
} }

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

@ -17,6 +17,7 @@
package com.epmet.datareport.dao.evaluationindex.screen; package com.epmet.datareport.dao.evaluationindex.screen;
import com.epmet.evaluationindex.screen.dto.form.AnNingSubAgencyIndexRankFormDTO;
import com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO; import com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO;
import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResult; import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResult;
import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO; import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO;
@ -58,5 +59,15 @@ public interface ScreenIndexDataMonthlyDao{
* @date 2020/8/20 10:04 上午 * @date 2020/8/20 10:04 上午
*/ */
List<SubAgencyIndexRankResultDTO> selectSubAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO); List<SubAgencyIndexRankResultDTO> selectSubAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO);
} /**
* 5下级部门指数排行安宁数据段用 - (上一个月)
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankFormDTO>>
* @Author zhangyong
* @Date 09:38 2020-09-08
**/
List<SubAgencyIndexRankResultDTO> selectAnNingSubAgencyIndexMonthlyRank(AnNingSubAgencyIndexRankFormDTO formDTO);
}

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

@ -17,10 +17,14 @@
package com.epmet.datareport.dao.evaluationindex.screen; package com.epmet.datareport.dao.evaluationindex.screen;
import com.epmet.evaluationindex.screen.dto.form.AnNingSubAgencyIndexRankFormDTO;
import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO;
import com.epmet.evaluationindex.screen.dto.result.YearAverageIndexResultDTO; import com.epmet.evaluationindex.screen.dto.result.YearAverageIndexResultDTO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 指数-指数数据(按年统计) * 指数-指数数据(按年统计)
* *
@ -37,5 +41,14 @@ public interface ScreenIndexDataYearlyDao{
* @date 2020/8/19 3:43 下午 * @date 2020/8/19 3:43 下午
*/ */
YearAverageIndexResultDTO selectYearAverageIndex(@Param("agencyId")String agencyId); YearAverageIndexResultDTO selectYearAverageIndex(@Param("agencyId")String agencyId);
} /**
* 5下级部门指数排行安宁数据段用 -
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankFormDTO>>
* @Author zhangyong
* @Date 09:38 2020-09-08
**/
List<SubAgencyIndexRankResultDTO> selectAnNingSubAgencyIndexYearlyRank(AnNingSubAgencyIndexRankFormDTO formDTO);
}

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

@ -1,9 +1,6 @@
package com.epmet.datareport.service.evaluationindex.screen; package com.epmet.datareport.service.evaluationindex.screen;
import com.epmet.evaluationindex.screen.dto.form.MonthBarchartFormDTO; import com.epmet.evaluationindex.screen.dto.form.*;
import com.epmet.evaluationindex.screen.dto.form.MonthPieChartFormDTO;
import com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO;
import com.epmet.evaluationindex.screen.dto.form.YearAverageIndexFormDTO;
import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResultDTO; import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResultDTO;
import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO; import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO;
import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO; import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO;
@ -51,4 +48,14 @@ public interface IndexService {
*/ */
List<SubAgencyIndexRankResultDTO> subAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO); List<SubAgencyIndexRankResultDTO> subAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO);
/**
* 5下级部门指数排行安宁数据段用
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankFormDTO>>
* @Author zhangyong
* @Date 09:38 2020-09-08
**/
List<SubAgencyIndexRankResultDTO> anNingSubAgencyIndexRank(AnNingSubAgencyIndexRankFormDTO formDTO);
} }

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

@ -12,6 +12,7 @@ import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO;
import com.epmet.evaluationindex.screen.dto.result.AgencyDistributionResultDTO; import com.epmet.evaluationindex.screen.dto.result.AgencyDistributionResultDTO;
import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO; import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO;
import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO; import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -43,13 +44,13 @@ public class AgencyServiceImpl implements AgencyService {
@Override @Override
public TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam) { public TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam) {
// 1. 查询客户根组织ID // 1. 查询客户根组织ID
// String customerId = externalAppRequestParam.getCustomerId(); String customerId = externalAppRequestParam.getCustomerId();
// 验签关闭,customerId无法获取,暂时写死 // 验签关闭,customerId无法获取,暂时写死
String customerId = "b09527201c4409e19d1dbc5e3c3429a1"; if(StringUtils.isBlank(customerId)){
customerId = "b09527201c4409e19d1dbc5e3c3429a1";
}
TreeResultDTO rootAgency = screenCustomerAgencyDao.selectRootAgencyId(customerId); TreeResultDTO rootAgency = screenCustomerAgencyDao.selectRootAgencyId(customerId);
if (null == rootAgency){ if (null == rootAgency){
return new TreeResultDTO(); return new TreeResultDTO();

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

@ -7,10 +7,8 @@ import com.epmet.datareport.dao.evaluationindex.screen.ScreenIndexDataMonthlyDao
import com.epmet.datareport.dao.evaluationindex.screen.ScreenIndexDataYearlyDao; import com.epmet.datareport.dao.evaluationindex.screen.ScreenIndexDataYearlyDao;
import com.epmet.datareport.service.evaluationindex.screen.IndexService; import com.epmet.datareport.service.evaluationindex.screen.IndexService;
import com.epmet.datareport.utils.DateUtils; import com.epmet.datareport.utils.DateUtils;
import com.epmet.evaluationindex.screen.dto.form.MonthBarchartFormDTO; import com.epmet.evaluationindex.screen.constant.ScreenConstant;
import com.epmet.evaluationindex.screen.dto.form.MonthPieChartFormDTO; import com.epmet.evaluationindex.screen.dto.form.*;
import com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO;
import com.epmet.evaluationindex.screen.dto.form.YearAverageIndexFormDTO;
import com.epmet.evaluationindex.screen.dto.result.*; import com.epmet.evaluationindex.screen.dto.result.*;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -182,4 +180,17 @@ public class IndexServiceImpl implements IndexService {
} }
return subAgencyIndexRankResultDTOS; return subAgencyIndexRankResultDTOS;
} }
@Override
public List<SubAgencyIndexRankResultDTO> anNingSubAgencyIndexRank(AnNingSubAgencyIndexRankFormDTO formDTO) {
List<SubAgencyIndexRankResultDTO> subAgencyIndexRankResultDTOS = new ArrayList<>();
if (ScreenConstant.YEAR_ID.equals(formDTO.getType())){
// 年 指数排行
subAgencyIndexRankResultDTOS = screenIndexDataYearlyDao.selectAnNingSubAgencyIndexYearlyRank(formDTO);
} else if (ScreenConstant.MONTH_ID.equals(formDTO.getType())){
// 月(上一个月) 指数排行
subAgencyIndexRankResultDTOS = screenIndexDataMonthlyDao.selectAnNingSubAgencyIndexMonthlyRank(formDTO);
}
return subAgencyIndexRankResultDTOS;
}
} }

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

@ -60,4 +60,27 @@
ORDER BY index_total DESC ORDER BY index_total DESC
LIMIT #{topNum} LIMIT #{topNum}
</select> </select>
</mapper>
<!-- 下级部门指数排行 安宁 --->
<select id="selectAnNingSubAgencyIndexMonthlyRank" parameterType="com.epmet.evaluationindex.screen.dto.form.AnNingSubAgencyIndexRankFormDTO" resultType="com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO">
SELECT
org_name AS `NAME`,
index_total AS totalIndex,
govern_ablity AS governAbility,
party_dev_ablity AS partyDevAbility,
service_ablity AS serviceAbility
FROM
screen_index_data_monthly
WHERE
del_flag = '0'
AND parent_id = #{agencyId}
AND month_id = left(replace(DATE_SUB( CURDATE(),INTERVAL 1 MONTH),'-',''),6)
<if test="sort == 'asc'">
ORDER BY index_total ASC
</if>
<if test="sort == 'desc'">
ORDER BY index_total DESC
</if>
LIMIT #{topNum}
</select>
</mapper>

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

@ -18,4 +18,27 @@
AND org_id = #{agencyId} AND org_id = #{agencyId}
AND year_id = DATE_FORMAT(NOW(),'%Y') AND year_id = DATE_FORMAT(NOW(),'%Y')
</select> </select>
</mapper>
<!-- 下级部门指数排行 安宁 --->
<select id="selectAnNingSubAgencyIndexYearlyRank" parameterType="com.epmet.evaluationindex.screen.dto.form.AnNingSubAgencyIndexRankFormDTO" resultType="com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO">
SELECT
org_name AS `NAME`,
index_total AS totalIndex,
govern_ablity AS governAbility,
party_dev_ablity AS partyDevAbility,
service_ablity AS serviceAbility
FROM
screen_index_data_yearly
WHERE
del_flag = '0'
AND parent_id = #{agencyId}
AND year_id = YEAR(CURDATE())
<if test="sort == 'asc'">
ORDER BY index_total ASC
</if>
<if test="sort == 'desc'">
ORDER BY index_total DESC
</if>
LIMIT #{topNum}
</select>
</mapper>

20
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java

@ -17,14 +17,13 @@
package com.epmet.dto.indexcal; package com.epmet.dto.indexcal;
import java.io.Serializable;
import java.util.Date;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.constant.IndexCalConstant; import com.epmet.constant.IndexCalConstant;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
/** /**
* /街道相关分数表 * /街道相关分数表
@ -80,20 +79,26 @@ public class AgencyScoreDTO implements Serializable {
/** /**
* 分值 * 分值
*/ */
private BigDecimal score; private BigDecimal score;
/** /**
* 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli街道相关jiedaoxiangguan全区相关:quanquxiangguan * 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli街道相关jiedaoxiangguan全区相关:quanquxiangguan
*/ */
private String indexCode; private String indexCode;
/**
* 所有指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
/** /**
* 数据类型 district 全区street街道 * 数据类型 district 全区street街道
*/ */
private String dataType; private String dataType;
/** /**
* *
*/ */
private Integer delFlag; private Integer delFlag;
@ -127,6 +132,7 @@ public class AgencyScoreDTO implements Serializable {
this.score = new BigDecimal(NumConstant.ZERO); this.score = new BigDecimal(NumConstant.ZERO);
this.indexCode = ""; this.indexCode = "";
this.dataType = IndexCalConstant.STREET_LEVEL; this.dataType = IndexCalConstant.STREET_LEVEL;
this.allParentIndexCode = "";
this.delFlag = 0; this.delFlag = 0;
this.revision = 0; this.revision = 0;
this.createdBy = "APP_USER"; this.createdBy = "APP_USER";

14
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java

@ -17,11 +17,11 @@
package com.epmet.dto.indexcal; package com.epmet.dto.indexcal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
/** /**
* 区直部门分值表 * 区直部门分值表
@ -77,12 +77,18 @@ public class DeptScoreDTO implements Serializable {
/** /**
* 分值 * 分值
*/ */
private BigDecimal score; private BigDecimal score;
/** /**
* 治理能力zhilinengli * 治理能力zhilinengli
*/ */
private String indexCode; private String indexCode;
/**
* 所有指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
/** /**
* *

30
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityDataFormDTO.java

@ -0,0 +1,30 @@
package com.epmet.dto.indexcollect.form;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 8治理能力-部门相关指标 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class DeptGovrnAbilityDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
/**
* yyyyMM
*/
private String monthId;
private List<DeptGovrnAbilityFormDTO> dataList;
}

30
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityDataFormDTO.java

@ -0,0 +1,30 @@
package com.epmet.dto.indexcollect.form;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 6治理能力-网格相关指标 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class GridGovrnAbilityDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
/**
* yyyyMM
*/
private String monthId;
private List<GridGovrnAbilityFormDTO> dataList;
}

30
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityDataFormDTO.java

@ -0,0 +1,30 @@
package com.epmet.dto.indexcollect.form;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 2党建能力-网格相关指标上报(按照月份) 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class GridPartyAbilityDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
/**
* yyyyMM
*/
private String monthId;
private List<GridPartyAbilityFormDTO> dataList;
}

4
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyAbilityFormDTO.java

@ -48,7 +48,7 @@ public class GridPartyAbilityFormDTO implements Serializable {
/** /**
* 网格党员人均提出的议题转项目数 * 网格党员人均提出的议题转项目数
*/ */
private Integer partyAvgShiftProjectCount; private BigDecimal partyAvgShiftProjectCount;
/** /**
* 网格活跃群众用户数 * 网格活跃群众用户数
@ -78,7 +78,7 @@ public class GridPartyAbilityFormDTO implements Serializable {
/** /**
* 网格群众人均提出的议题转项目数 * 网格群众人均提出的议题转项目数
*/ */
private Integer userAvgShiftProjectCount; private BigDecimal userAvgShiftProjectCount;
/** /**
* 建群党员数累计值 * 建群党员数累计值

2
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridPartyMemberDataFormDTO.java

@ -29,5 +29,5 @@ public class GridPartyMemberDataFormDTO implements Serializable {
*/ */
private String monthId; private String monthId;
private List<GridPartyMemberDataDetailFormDTO> partyMemberDataList; private List<GridPartyMemberDataDetailFormDTO> dataList;
} }

28
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridServiceAbilityDataFormDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.indexcollect.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 4服务能力-网格相关指标 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class GridServiceAbilityDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
/**
* yyyyMM
*/
private String monthId;
private List<GridServiceAbilityFormDTO> dataList;
}

30
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityDataFormDTO.java

@ -0,0 +1,30 @@
package com.epmet.dto.indexcollect.form;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 7治理能力-街道及社区相关指标 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class OrgGovrnAbilityDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
/**
* yyyyMM
*/
private String monthId;
private List<OrgGovrnAbilityFormDTO> dataList;
}

30
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityDataFormDTO.java

@ -0,0 +1,30 @@
package com.epmet.dto.indexcollect.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 3党建能力-街道及社区相关指标 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class OrgPartyAbilityDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
/**
* yyyyMM
*/
private String monthId;
private List<OrgPartyAbilityFormDTO> dataList;
}

29
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityDataFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.indexcollect.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 5服务能力-组织街道|社区|全区相关指标 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class OrgServiceAbilityDataFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
/**
* yyyyMM
*/
private String monthId;
private List<OrgServiceAbilityFormDTO> dataList;
}

6
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityScoreDTO.java

@ -84,6 +84,11 @@ public class FactIndexCommunityScoreDTO implements Serializable {
*/ */
private String indexCode; private String indexCode;
/**
* 所有指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
/** /**
* 删除状态 * 删除状态
*/ */
@ -124,6 +129,7 @@ public class FactIndexCommunityScoreDTO implements Serializable {
this.isTotal = "0"; this.isTotal = "0";
this.score = new BigDecimal(0); this.score = new BigDecimal(0);
this.indexCode = ""; this.indexCode = "";
this.allParentIndexCode = "";
this.delFlag = 0; this.delFlag = 0;
this.revision = 0; this.revision = 0;
this.createdBy = "APP_USER"; this.createdBy = "APP_USER";

48
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/ScreenCollFormDTO.java

@ -0,0 +1,48 @@
package com.epmet.dto.screencoll;
import com.alibaba.fastjson.JSON;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 大屏采集通用入参
*
* @author yinzuomei@elink-cn.com
* @date 2020/9/9 10:25
*/
@Data
public class ScreenCollFormDTO<T> implements Serializable {
private static final long serialVersionUID = 4605543711669000348L;
/**
* 当为true时后台将先删除当前维度的数据后新增
*/
private Boolean isFirst;
/**
* 日期Id, 数据更新至yyyyMMdd
*/
private String dateId;
/**
* yyyyMM
*/
private String monthId;
/**
* yyyy
*/
private String yearId;
/**
* 数据集合
*/
private List<T> dataList;
@Override
public String toString() {
return JSON.toJSONString(this);
}
}

25
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CpcBaseDataListFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 2党员基本情况 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class CpcBaseDataListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
private List<CpcBaseDataFormDTO> dataList;
}

25
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerAgencyListFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 14组织层级 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class CustomerAgencyListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
private List<CustomerAgencyFormDTO> dataList;
}

24
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerDeptListFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 16部门信息上传 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class CustomerDeptListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
private List<CustomerDeptFormDTO> dataList;
}

24
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/CustomerGridListFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 15网格信息上传 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class CustomerGridListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
private List<CustomerGridFormDTO> dataList;
}

2
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/DifficultyDataFormDTO.java

@ -21,6 +21,6 @@ public class DifficultyDataFormDTO implements Serializable {
/** /**
* 难点堵点数据 * 难点堵点数据
*/ */
private List<DifficultyDataDetailFormDTO> diffcultyDataList; private List<DifficultyDataDetailFormDTO> dataList;
} }

28
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/EventDataListFormDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.screencoll.form;
import com.epmet.dto.indexcollect.form.GridPartyAbilityFormDTO;
import com.epmet.dto.screencoll.ImgDataListDTO;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 4事件数据(中央区-事件数据) 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class EventDataListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
private List<EventDataFormDTO> dataList;
}

29
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/GovernRankDataListFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 5基层治理-治理能力数据 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class GovernRankDataListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
/**
* yyyyMM
*/
private String monthId;
private List<GovernRankDataFormDTO> dataList;
}

29
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataListMonthlyFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 1指数_按月统计 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class IndexDataListMonthlyFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
/**
* yyyyMM
*/
private String monthId;
private List<IndexDataMonthlyFormDTO> dataList;
}

29
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataListYearlyFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 17指数_按年统计 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class IndexDataListYearlyFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
/**
* yyyy
*/
private String yearId;
private List<IndexDataYearlyFormDTO> dataList;
}

29
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/OrgRankDataListFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 6党建引领-组织排行 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class OrgRankDataListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
/**
* yyyyMM
*/
private String monthId;
private List<OrgRankDataFormDTO> dataList;
}

29
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyBranchDataListFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 7基层党建-建设情况数据支部联建志愿 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class PartyBranchDataListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
/**
* yyyyMM
*/
private String monthId;
private List<PartyBranchDataFormDTO> dataList;
}

24
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyLinkMassesDataListFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 8党建引领-党员联系群众数据 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class PartyLinkMassesDataListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
private List<PartyLinkMassesDataFormDTO> dataList;
}

24
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PartyUserRankDataListFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 9党建引领|基层治理-居民党员积分排行榜 入参
* @Auther: zhangyong
* @Date: 2020-08-21 09:59
*/
@Data
public class PartyUserRankDataListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
private List<PartyUserRankDataFormDTO> dataList;
}

25
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PioneerDataListFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 10党建引领-先锋模范数据
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class PioneerDataListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
private List<PioneerDataFormDTO> dataList;
}

25
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/PublicPartiTotalDataListFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 18公众参与各类总数 入参
* 公众参与-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class PublicPartiTotalDataListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
private List<PublicPartiTotalDataFormDTO> dataList;
}

29
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserJoinListFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 11基层治理-公众参与 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class UserJoinListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
/**
* yyyyMM
*/
private String monthId;
private List<UserJoinFormDTO> dataList;
}

24
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/UserTotalDataListFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.screencoll.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 12中央区各类总数 入参
* @Auther: zhangyong
* @Date: 2020-08-18 09:59
*/
@Data
public class UserTotalDataListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 当为true时后台将删除本月数据
*/
private Boolean isFirst;
private List<UserTotalDataFormDTO> dataList;
}

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

@ -127,12 +127,107 @@
<profiles> <profiles>
<profile> <profile>
<id>dev</id> <id>dev</id>
<properties>
<server.port>8108</server.port>
<spring.profiles.active>dev</spring.profiles.active>
<!-- 数据库配置-->
<datasource.druid.stats.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_data_statistical?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.stats.url>
<datasource.druid.stats.username>epmet_data_statistical_user</datasource.druid.stats.username>
<datasource.druid.stats.password>EpmEt-db-UsEr</datasource.druid.stats.password>
<datasource.druid.org.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_gov_org?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.org.url>
<datasource.druid.org.username>epmet_gov_org_user</datasource.druid.org.username>
<datasource.druid.org.password>EpmEt-db-UsEr</datasource.druid.org.password>
<datasource.druid.issue.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_gov_issue?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.issue.url>
<datasource.druid.issue.username>epmet_gov_issue_user</datasource.druid.issue.username>
<datasource.druid.issue.password>EpmEt-db-UsEr</datasource.druid.issue.password>
<datasource.druid.project.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_gov_project?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.project.url>
<datasource.druid.project.username>epmet_gov_project_user</datasource.druid.project.username>
<datasource.druid.project.password>EpmEt-db-UsEr</datasource.druid.project.password>
<datasource.druid.voice.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_gov_voice?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.voice.url>
<datasource.druid.voice.username>epmet_gov_voice_user</datasource.druid.voice.username>
<datasource.druid.voice.password>EpmEt-db-UsEr</datasource.druid.voice.password>
<datasource.druid.crm.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_oper_crm?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.crm.url>
<datasource.druid.crm.username>epmet_oper_crm_user</datasource.druid.crm.username>
<datasource.druid.crm.password>EpmEt-db-UsEr</datasource.druid.crm.password>
<datasource.druid.group.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_resi_group?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.group.url>
<datasource.druid.group.username>epmet_resi_group_user</datasource.druid.group.username>
<datasource.druid.group.password>EpmEt-db-UsEr</datasource.druid.group.password>
<datasource.druid.user.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_user?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.user.url>
<datasource.druid.user.username>epmet_user_user</datasource.druid.user.username>
<datasource.druid.user.password>EpmEt-db-UsEr</datasource.druid.user.password>
<datasource.druid.statsdisplay.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_data_statistical_display?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.statsdisplay.url>
<datasource.druid.statsdisplay.username>epmet_data_stats_display_user</datasource.druid.statsdisplay.username>
<datasource.druid.statsdisplay.password>EpmEt-db-UsEr</datasource.druid.statsdisplay.password>
<datasource.druid.evaluationIndex.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_evaluation_index?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</datasource.druid.evaluationIndex.url>
<datasource.druid.evaluationIndex.username>epmet_evaluation_index_user</datasource.druid.evaluationIndex.username>
<datasource.druid.evaluationIndex.password>EpmEt-db-UsEr</datasource.druid.evaluationIndex.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled>
<nacos.server-addr>192.168.1.130:8848</nacos.server-addr>
<nacos.discovery.namespace>6ceab336-d004-4acf-89c6-e121d06f4988</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<!--flyway migration 数据库迁移工具-->
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--线程池配置-->
<thread.pool.core-pool-size>5</thread.pool.core-pool-size>
<thread.pool.max-pool-size>8</thread.pool.max-pool-size>
<thread.pool.queue-capacity>10</thread.pool.queue-capacity>
<thread.pool.keep-alive>30</thread.pool.keep-alive>
<!--钉钉 机器人地址-->
<dingTalk.robot.webHook>https://oapi.dingtalk.com/robot/send?access_token=90782b119f82a5b6bb8e0f819b6a77bbc2102b53aa2d7d2e24fa10b66d580b1c</dingTalk.robot.webHook>
<dingTalk.robot.secret>SEC080aac67ff78e79fdaba132aa51e3fb3f6060dec99492feaac82cabf9f8b6a19</dingTalk.robot.secret>
</properties>
</profile>
<profile>
<id>local</id>
<activation> <activation>
<activeByDefault>true</activeByDefault> <activeByDefault>true</activeByDefault>
</activation> </activation>
<properties> <properties>
<server.port>8108</server.port> <server.port>8108</server.port>
<spring.profiles.active>dev</spring.profiles.active> <spring.profiles.active>local</spring.profiles.active>
<!-- 数据库配置--> <!-- 数据库配置-->
<datasource.druid.stats.url> <datasource.druid.stats.url>
@ -201,7 +296,7 @@
<spring.redis.port>6379</spring.redis.port> <spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password> <spring.redis.password>123456</spring.redis.password>
<!-- nacos --> <!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled> <nacos.register-enabled>false</nacos.register-enabled>
<nacos.server-addr>192.168.1.130:8848</nacos.server-addr> <nacos.server-addr>192.168.1.130:8848</nacos.server-addr>
<nacos.discovery.namespace>6ceab336-d004-4acf-89c6-e121d06f4988</nacos.discovery.namespace> <nacos.discovery.namespace>6ceab336-d004-4acf-89c6-e121d06f4988</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace> <nacos.config.namespace></nacos.config.namespace>

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/DataStatsApplication.java

@ -1,7 +1,5 @@
package com.epmet; package com.epmet;
import com.epmet.commons.tools.enums.EnvEnum;
import com.epmet.commons.tools.utils.HttpClientManager;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@ -17,6 +15,5 @@ public class DataStatsApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(DataStatsApplication.class ,args); SpringApplication.run(DataStatsApplication.class ,args);
HttpClientManager.getInstance().sendAlarmMsg(EnvEnum.getCurrentEnv().getName() +" DataStatsApplication started!");
} }
} }

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

@ -4,12 +4,12 @@ import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.indexcollect.form.*; import com.epmet.dto.indexcollect.form.*;
import com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO;
import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService; import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/** /**
* 指标采集相关api * 指标采集相关api
@ -51,7 +51,7 @@ public class FactIndexCollectController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("gridpartyability") @PostMapping("gridpartyability")
public Result gridPartyAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<GridPartyAbilityFormDTO> formDTO) { public Result gridPartyAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody GridPartyAbilityDataFormDTO formDTO) {
factIndexCollectService.insertGridPartyAbility(formDTO, externalAppRequestParam.getCustomerId()); factIndexCollectService.insertGridPartyAbility(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -67,7 +67,7 @@ public class FactIndexCollectController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("orgpartyability") @PostMapping("orgpartyability")
public Result orgPartyAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<OrgPartyAbilityFormDTO> formDTO) { public Result orgPartyAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody OrgPartyAbilityDataFormDTO formDTO) {
factIndexCollectService.insertOrgPartyAbility(formDTO, externalAppRequestParam.getCustomerId()); factIndexCollectService.insertOrgPartyAbility(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -83,7 +83,7 @@ public class FactIndexCollectController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("gridserviceability") @PostMapping("gridserviceability")
public Result gridServiceAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<GridServiceAbilityFormDTO> formDTO) { public Result gridServiceAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody GridServiceAbilityDataFormDTO formDTO) {
factIndexCollectService.insertGridServiceAbility(formDTO, externalAppRequestParam.getCustomerId()); factIndexCollectService.insertGridServiceAbility(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -99,7 +99,7 @@ public class FactIndexCollectController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("orgserviceability") @PostMapping("orgserviceability")
public Result orgServiceAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<OrgServiceAbilityFormDTO> formDTO) { public Result orgServiceAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody OrgServiceAbilityDataFormDTO formDTO) {
factIndexCollectService.insertOrgServiceAbility(formDTO, externalAppRequestParam.getCustomerId()); factIndexCollectService.insertOrgServiceAbility(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -115,7 +115,7 @@ public class FactIndexCollectController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("gridgovrnability") @PostMapping("gridgovrnability")
public Result gridGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<GridGovrnAbilityFormDTO> formDTO) { public Result gridGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody GridGovrnAbilityDataFormDTO formDTO) {
factIndexCollectService.insertGridGovrnAbility(formDTO, externalAppRequestParam.getCustomerId()); factIndexCollectService.insertGridGovrnAbility(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -131,7 +131,7 @@ public class FactIndexCollectController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("orggovrnability") @PostMapping("orggovrnability")
public Result orgGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<OrgGovrnAbilityFormDTO> formDTO) { public Result orgGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody OrgGovrnAbilityDataFormDTO formDTO) {
factIndexCollectService.insertOrgGovrnAbility(formDTO, externalAppRequestParam.getCustomerId()); factIndexCollectService.insertOrgGovrnAbility(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -147,7 +147,7 @@ public class FactIndexCollectController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("deptgovrnability") @PostMapping("deptgovrnability")
public Result deptGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<DeptGovrnAbilityFormDTO> formDTO) { public Result deptGovrnAbility(ExternalAppRequestParam externalAppRequestParam, @RequestBody DeptGovrnAbilityDataFormDTO formDTO) {
factIndexCollectService.insertDeptGovrnAbility(formDTO, externalAppRequestParam.getCustomerId()); factIndexCollectService.insertDeptGovrnAbility(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }

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

@ -1,9 +1,10 @@
package com.epmet.controller; package com.epmet.controller;
import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.extappauth.bean.ExternalAppRequestParam;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.screen.form.IndexCalculateForm;
import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService;
import com.epmet.service.evaluationindex.indexcal.IndexCalculateService; import com.epmet.service.evaluationindex.indexcal.IndexCalculateService;
import com.epmet.util.DimIdGenerator; import com.epmet.util.DimIdGenerator;
@ -40,10 +41,21 @@ public class IndexCalculateController {
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-20 * @Date 10:52 2020-08-20
**/ **/
@ExternalAppRequestAuth
@PostMapping("all") @PostMapping("all")
public Result<Boolean> indexCalculate(@RequestBody IndexCalculateForm formDTO) { public Result<Boolean> indexCalculate(ExternalAppRequestParam externalAppRequestParam, @RequestBody CalculateCommonFormDTO formDTO) {
formDTO.setCustomerId(externalAppRequestParam.getCustomerId());
Boolean aBoolean = indexCalculateService.indexCalculate(formDTO);
if (aBoolean) {
return new Result<Boolean>().ok(true);
}
return new Result<Boolean>().error("指标计算失败");
}
@PostMapping("reAll")
public Result<Boolean> calculateAll(@RequestBody CalculateCommonFormDTO formDTO) {
Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); Boolean aBoolean = indexCalculateService.indexCalculate(formDTO);
if (aBoolean){ if (aBoolean) {
return new Result<Boolean>().ok(true); return new Result<Boolean>().ok(true);
} }
return new Result<Boolean>().error("指标计算失败"); return new Result<Boolean>().error("指标计算失败");

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

@ -0,0 +1,15 @@
package com.epmet.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 孔村大屏数据采集api
*
* @author yinzuomei@elink-cn.com
* @date 2020/9/9 10:18
*/
@RestController
@RequestMapping("kcscreencoll")
public class KcScreenCollController {
}

75
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java → epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ShiBeiScreenCollController.java

@ -4,27 +4,26 @@ import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth;
import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.screencoll.form.*; import com.epmet.dto.screencoll.form.*;
import com.epmet.service.evaluationindex.screen.ScreenCollService; import com.epmet.service.evaluationindex.screen.ShiBeiScreenCollService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/** /**
* 大屏数据采集api * 市北大屏数据采集api
* *
* @author yinzuomei@elink-cn.com * @author yinzuomei@elink-cn.com
* @date 2020/8/18 10:25 * @date 2020/8/18 10:25
*/ */
@RestController @RestController
@RequestMapping("screencoll") @RequestMapping("screencoll")
public class ScreenCollController { public class ShiBeiScreenCollController {
@Autowired @Autowired
private ScreenCollService screenCollService; private ShiBeiScreenCollService shiBeiScreenCollService;
/** /**
* 9党建引领|基层治理-居民党员积分排行榜 * 9党建引领|基层治理-居民党员积分排行榜
@ -37,8 +36,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("partyuserrankdata") @PostMapping("partyuserrankdata")
public Result partyUserRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<PartyUserRankDataFormDTO> formDTO) { public Result partyUserRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody PartyUserRankDataListFormDTO formDTO) {
screenCollService.insertPartyUserRankData(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertPartyUserRankData(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -53,8 +52,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("partylinkmassesdata") @PostMapping("partylinkmassesdata")
public Result partyLinkMassesData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<PartyLinkMassesDataFormDTO> formDTO) { public Result partyLinkMassesData(ExternalAppRequestParam externalAppRequestParam, @RequestBody PartyLinkMassesDataListFormDTO formDTO) {
screenCollService.insertPartyLinkMassesData(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertPartyLinkMassesData(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -69,8 +68,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("meetdata") @PostMapping("meetdata")
public Result meetData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<PartyBranchDataFormDTO> formDTO) { public Result meetData(ExternalAppRequestParam externalAppRequestParam, @RequestBody PartyBranchDataListFormDTO formDTO) {
screenCollService.insertPartyBranchData(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertPartyBranchData(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -85,8 +84,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("orgrankdata") @PostMapping("orgrankdata")
public Result orgRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<OrgRankDataFormDTO> formDTO) { public Result orgRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody OrgRankDataListFormDTO formDTO) {
screenCollService.insertOrgRankData(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertOrgRankData(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -101,8 +100,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("governrankdata") @PostMapping("governrankdata")
public Result governRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<GovernRankDataFormDTO> formDTO) { public Result governRankData(ExternalAppRequestParam externalAppRequestParam, @RequestBody GovernRankDataListFormDTO formDTO) {
screenCollService.insertGovernRankData(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertGovernRankData(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -117,8 +116,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("eventdata") @PostMapping("eventdata")
public Result eventData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<EventDataFormDTO> formDTO) { public Result eventData(ExternalAppRequestParam externalAppRequestParam, @RequestBody EventDataListFormDTO formDTO) {
screenCollService.insertEventData(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertEventData(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -134,7 +133,7 @@ public class ScreenCollController {
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("difficultydata") @PostMapping("difficultydata")
public Result difficultyData(ExternalAppRequestParam externalAppRequestParam, @RequestBody DifficultyDataFormDTO formDTO) { public Result difficultyData(ExternalAppRequestParam externalAppRequestParam, @RequestBody DifficultyDataFormDTO formDTO) {
screenCollService.insertDifficultyData(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertDifficultyData(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -149,8 +148,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("cpcbasedata") @PostMapping("cpcbasedata")
public Result cpcbaseData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<CpcBaseDataFormDTO> formDTO) { public Result cpcbaseData(ExternalAppRequestParam externalAppRequestParam, @RequestBody CpcBaseDataListFormDTO formDTO) {
screenCollService.insertCpcbaseData(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertCpcbaseData(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -165,8 +164,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("indexdatamonthly") @PostMapping("indexdatamonthly")
public Result indexDataMonthly(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<IndexDataMonthlyFormDTO> formDTO) { public Result indexDataMonthly(ExternalAppRequestParam externalAppRequestParam, @RequestBody IndexDataListMonthlyFormDTO formDTO) {
screenCollService.insertIndexDataMonthly(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertIndexDataMonthly(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -183,8 +182,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("indexdatayearly") @PostMapping("indexdatayearly")
public Result indexDataYearly(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<IndexDataYearlyFormDTO> formDTO) { public Result indexDataYearly(ExternalAppRequestParam externalAppRequestParam, @RequestBody IndexDataListYearlyFormDTO formDTO) {
screenCollService.insertIndexDataYearly(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertIndexDataYearly(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -199,8 +198,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("customerdept") @PostMapping("customerdept")
public Result customerDept(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<CustomerDeptFormDTO> formDTO) { public Result customerDept(ExternalAppRequestParam externalAppRequestParam, @RequestBody CustomerDeptListFormDTO formDTO) {
screenCollService.insertCustomerDept(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertCustomerDept(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -215,8 +214,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("customergrid") @PostMapping("customergrid")
public Result customerGrid(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<CustomerGridFormDTO> formDTO) { public Result customerGrid(ExternalAppRequestParam externalAppRequestParam, @RequestBody CustomerGridListFormDTO formDTO) {
screenCollService.insertCustomerGrid(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertCustomerGrid(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -231,8 +230,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("customeragency") @PostMapping("customeragency")
public Result customerAgency(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<CustomerAgencyFormDTO> formDTO) { public Result customerAgency(ExternalAppRequestParam externalAppRequestParam, @RequestBody CustomerAgencyListFormDTO formDTO) {
screenCollService.insertCustomerAgency(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertCustomerAgency(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -247,8 +246,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("usertotaldata") @PostMapping("usertotaldata")
public Result userTotalData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<UserTotalDataFormDTO> formDTO) { public Result userTotalData(ExternalAppRequestParam externalAppRequestParam, @RequestBody UserTotalDataListFormDTO formDTO) {
screenCollService.insertUserTotalData(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertUserTotalData(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -263,8 +262,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("userjoin") @PostMapping("userjoin")
public Result userJoin(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<UserJoinFormDTO> formDTO) { public Result userJoin(ExternalAppRequestParam externalAppRequestParam, @RequestBody UserJoinListFormDTO formDTO) {
screenCollService.insertUserJoin(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertUserJoin(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -279,8 +278,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("pioneerdata") @PostMapping("pioneerdata")
public Result pioneerData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<PioneerDataFormDTO> formDTO) { public Result pioneerData(ExternalAppRequestParam externalAppRequestParam, @RequestBody PioneerDataListFormDTO formDTO) {
screenCollService.insertPioneerData(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertPioneerData(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
@ -296,8 +295,8 @@ public class ScreenCollController {
**/ **/
@ExternalAppRequestAuth @ExternalAppRequestAuth
@PostMapping("publicpartitotaldata") @PostMapping("publicpartitotaldata")
public Result publicPartiTotalData(ExternalAppRequestParam externalAppRequestParam, @RequestBody List<PublicPartiTotalDataFormDTO> formDTO) { public Result publicPartiTotalData(ExternalAppRequestParam externalAppRequestParam, @RequestBody PublicPartiTotalDataListFormDTO formDTO) {
screenCollService.insertPublicPartiTotalData(formDTO, externalAppRequestParam.getCustomerId()); shiBeiScreenCollService.insertPublicPartiTotalData(formDTO, externalAppRequestParam.getCustomerId());
return new Result(); return new Result();
} }
} }

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

@ -48,11 +48,10 @@ public interface AgencyScoreDao extends BaseDao<AgencyScoreEntity> {
* @Description 删除旧记录 * @Description 删除旧记录
* @param customerId * @param customerId
* @param monthId * @param monthId
* @param indexCode
* @author zxc * @author zxc
* @date 2020/9/2 15:47 * @date 2020/9/2 15:47
*/ */
void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("dataType")String dataType); void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("dataType")String dataType);
/** /**
* @Description 查询fact_index_agency_score相关信息 * @Description 查询fact_index_agency_score相关信息

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

@ -0,0 +1,107 @@
/**
* 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.dto.indexcal.AgencyScoreDTO;
import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO;
import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity;
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-02
*/
@Mapper
public interface AgencySubScoreDao extends BaseDao<AgencyScoreEntity> {
/**
* @param lists
* @Description 街道中间表插入
* @author zxc
* @date 2020/8/27 5:05 下午
*/
void insertStreetRecord(@Param("lists") List<AgencyScoreDTO> lists);
/**
* @param customerId
* @param monthId
* @param indexCode
* @Description 删除旧记录
* @author zxc
* @date 2020/9/2 15:47
*/
void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode, @Param("dataType") String dataType);
/**
* @param customerId
* @param monthId
* @Description 查询fact_index_agency_score相关信息
* @author zxc
* @date 2020/9/1 9:41 上午
*/
List<AgencyScoreDTO> selectAgencyScoreInfo(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("dataType") String dataType);
/**
* @param customerId
* @param monthId
* @Description 区下级街道得分平均值
* @author zxc
* @date 2020/8/31 1:51 下午
*/
List<SubAgencyScoreAvgResultDTO> selectAgencyScoreAvg(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode, @Param("dataType") String dataType);
/**
* 根据入参查询 /街道相关分数表 记录
*
* @param customerId
* @param monthId
* @return java.util.List<com.epmet.dto.indexcal.AgencyScoreDTO>
* @Author zhangyong
* @Date 10:43 2020-09-03
**/
List<AgencyScoreDTO> selectListAgencyScore(@Param("customerId") String customerId, @Param("monthId") String monthId);
/**
* 批量插入区/街道相关分数表
*
* @param list
* @param customerId
* @return void
* @Author zhangyong
* @Date 11:11 2020-09-04
**/
void batchInsertAgencyScoreData(@Param("list") List<AgencyScoreEntity> list, @Param("customerId") String customerId);
/**
* 根据入参查询 /街道相关分数表id
*
* @param customerId
* @param monthId
* @return java.util.List<java.lang.String>
* @Author zhangyong
* @Date 10:43 2020-09-03
**/
List<String> selectListAgencyId(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java → epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java

@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.epmet.dao.evaluationindex.screen; package com.epmet.dao.evaluationindex.indexcal;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcal.SubCommunityAvgResultDTO; import com.epmet.dto.indexcal.SubCommunityAvgResultDTO;
@ -33,7 +33,7 @@ import java.util.List;
* @since v1.0.0 2020-08-31 * @since v1.0.0 2020-08-31
*/ */
@Mapper @Mapper
public interface FactIndexCommunityScoreDao extends BaseDao<FactIndexCommunityScoreEntity> { public interface CommunityScoreDao extends BaseDao<FactIndexCommunityScoreEntity> {
/** /**
* @Description 社区中间表插入 * @Description 社区中间表插入
@ -47,11 +47,10 @@ public interface FactIndexCommunityScoreDao extends BaseDao<FactIndexCommunitySc
* @Description 删除旧记录 * @Description 删除旧记录
* @param customerId * @param customerId
* @param monthId * @param monthId
* @param indexCode
* @author zxc * @author zxc
* @date 2020/9/1 9:03 上午 * @date 2020/9/1 9:03 上午
*/ */
void deleteOldRecord(@Param("customerId") String customerId,@Param("monthId")String monthId,@Param("indexCode")String indexCode); void deleteOldRecord(@Param("customerId") String customerId,@Param("monthId")String monthId);
/** /**
* @Description 查询社区相关信息 * @Description 查询社区相关信息

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

@ -0,0 +1,105 @@
/**
* 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.dto.indexcal.SubCommunityAvgResultDTO;
import com.epmet.dto.screen.FactIndexCommunityScoreDTO;
import com.epmet.entity.evaluationindex.screen.FactIndexCommunityScoreEntity;
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-08-31
*/
@Mapper
public interface CommunitySubScoreDao extends BaseDao<FactIndexCommunityScoreEntity> {
/**
* @param lists
* @Description 社区中间表插入
* @author zxc
* @date 2020/8/27 5:05 下午
*/
void insertCommunityPartyRecord(@Param("lists") List<FactIndexCommunityScoreDTO> lists);
/**
* @param customerId
* @param monthId
* @Description 删除旧记录
* @author zxc
* @date 2020/9/1 9:03 上午
*/
void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId") String monthId);
/**
* @param customerId
* @param monthId
* @Description 查询社区相关信息
* @author zxc
* @date 2020/9/1 9:41 上午
*/
List<FactIndexCommunityScoreDTO> selectCommunityInfo(@Param("customerId") String customerId, @Param("monthId") String monthId);
/**
* 根据入参查询 查询社区相关信息
*
* @param customerId
* @param monthId
* @return java.util.List<com.epmet.dto.screen.FactIndexCommunityScoreDTO>
* @Author zhangyong
* @Date 10:43 2020-09-03
**/
List<FactIndexCommunityScoreDTO> selectListCommunityScore(@Param("customerId") String customerId, @Param("monthId") String monthId);
/**
* @param customerId
* @param monthId
* @Description 街道下级所有社区得分平均值
* @author zxc
* @date 2020/8/31 1:51 下午
*/
List<SubCommunityAvgResultDTO> selectSubCommAvgScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode);
/**
* 批量插入 社区相关分数表
*
* @param list
* @param customerId
* @return void
* @Author zhangyong
* @Date 11:11 2020-09-04
**/
void batchInsertCommunityScoreData(@Param("list") List<FactIndexCommunityScoreEntity> list, @Param("customerId") String customerId);
/**
* 根据入参查询 查询社区id
*
* @param customerId
* @param monthId
* @return java.util.List<java.util.String>
* @Author zhangyong
* @Date 10:43 2020-09-03
**/
List<String> selectListCommunityId(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

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

@ -80,7 +80,7 @@ public interface CpcScoreDao extends BaseDao<CpcScoreEntity> {
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("indexCode") String indexCode);
List<CpcScoreEntity> getPartScore(@Param("customerId") String customerId, @Param("monthId") String monthId); List<CpcScoreEntity> getPartScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allParentCode") String allParentCode);
int insertBatch(@Param("list") Collection<CpcScoreEntity> values); int insertBatch(@Param("list") Collection<CpcScoreEntity> values);
} }

87
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcSubScoreDao.java

@ -0,0 +1,87 @@
/**
* 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.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity;
import com.epmet.entity.evaluationindex.indexcal.CpcSubScoreEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.List;
/**
* 党员相关分值
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-31
*/
@Mapper
public interface CpcSubScoreDao extends BaseDao<CpcScoreEntity> {
/**
* @param customerId
* @param monthId
* @param gridId
* @return java.math.BigDecimal
* @author yinzuomei
* @description 获取网格内党员的联系群众能力考评分平均值
* @Date 2020/8/31 10:56
**/
BigDecimal selectGridContactMassesAvgValue(@Param("customerId") String customerId,
@Param("monthId") String monthId,
@Param("gridId") String gridId);
/**
* @param formDTO
* @return java.util.List<java.math.BigDecimal>
* @author yinzuomei
* @description 获取网格内党员的联系群众能力考评分平均值的最大值最小值
* @Date 2020/8/31 12:10
**/
List<BigDecimal> selectListGridContactMassesAvgValue(CalculateCommonFormDTO formDTO);
/**
* @param calculateCommonFormDTO
* @return java.util.List<java.math.BigDecimal>
* @author yinzuomei
* @description 网格内党员的参与议事能力考评分平均值 最大值最小值
* @Date 2020/8/31 14:42
**/
List<BigDecimal> selectListJoinIssueAvgValue(CalculateCommonFormDTO calculateCommonFormDTO);
/**
* @param customerId
* @param monthId
* @param gridId
* @return java.math.BigDecimal
* @author yinzuomei
* @description 组织内党员的参与议事能力考评分平均值
* @Date 2020/8/31 15:51
**/
BigDecimal selectGridJoinIssueAvgValue(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("gridId") String gridId);
int deleteByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allParentCode") String allParentCode);
List<CpcScoreEntity> getPartScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("allParentCode") String allParentCode);
int insertBatch(@Param("list") Collection<CpcSubScoreEntity> values);
}

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

@ -0,0 +1,92 @@
/**
* 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.dto.indexcal.DeptScoreDTO;
import com.epmet.dto.indexcal.SubAgencyScoreAvgResultDTO;
import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity;
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-02
*/
@Mapper
public interface DeptSubScoreDao extends BaseDao<DeptScoreEntity> {
/**
* 根据入参查询 区直部门分值表 记录
*
* @param customerId
* @param monthId
* @return java.util.List<com.epmet.dto.indexcal.DeptScoreDTO>
* @Author zhangyong
* @Date 10:43 2020-09-03
**/
List<DeptScoreDTO> selectListDeptScore(@Param("customerId") String customerId, @Param("monthId") String monthId);
/**
* 批量插入 区直部门分值表
*
* @param list
* @param customerId
* @return void
* @Author zhangyong
* @Date 11:11 2020-09-04
**/
void batchInsertDeptScoreData(@Param("list") List<DeptScoreEntity> list, @Param("customerId") String customerId);
/**
* 根据入参查询 区直部门分值表id
*
* @param customerId
* @param monthId
* @return java.lang.String
* @Author zhangyong
* @Date 10:43 2020-09-03
**/
List<String> selectListDeptId(@Param("customerId") String customerId, @Param("monthId") String monthId);
/**
* @param customerId
* @param monthId
* @param indexCode
* @Description 所有直属部门治理能力平均值
* @author zxc
* @date 2020/9/4 10:53 上午
*/
List<SubAgencyScoreAvgResultDTO> selectGovernDeptScoreAvg(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode);
/**
* @param customerId
* @param monthId
* @param deptId
* @return int
* @author yinzuomei
* @description
* @Date 2020/9/7 14:30
**/
int deleteByDeptIdAndMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("deptId") String deptId);
}

43
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java

@ -20,6 +20,8 @@ package com.epmet.dao.evaluationindex.indexcal;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.indexcal.GridScoreDTO; import com.epmet.dto.indexcal.GridScoreDTO;
import com.epmet.dto.screen.FactIndexGridScoreDTO;
import com.epmet.dto.screen.result.SubGridAvgResultDTO;
import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -66,4 +68,45 @@ public interface GridScoreDao extends BaseDao<GridScoreEntity> {
* @Date 2020/8/31 16:42 * @Date 2020/8/31 16:42
**/ **/
List<GridScoreDTO> selectList(CalculateCommonFormDTO formDTO); List<GridScoreDTO> selectList(CalculateCommonFormDTO formDTO);
/**
* @Description 下属所有网格的平均值
* @param customerId
* @param monthId
* @author zxc
* @date 2020/8/28 3:20 下午
*/
List<SubGridAvgResultDTO> selectSubGridAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode);
/**
* 根据入参查询 网格相关分值记录
* @param customerId
* @param monthId
* @return java.util.List<com.epmet.dto.screen.FactIndexGridScoreDTO>
* @Author zhangyong
* @Date 10:43 2020-09-03
**/
List<FactIndexGridScoreDTO> selectListGridScore(@Param("customerId")String customerId, @Param("monthId")String monthId);
/**
* 根据入参查询 网格id
* @param customerId
* @param monthId
* @return java.util.List<java.util.String>
* @Author zhangyong
* @Date 10:43 2020-09-03
**/
List<String> selectListGridId(@Param("customerId")String customerId, @Param("monthId")String monthId);
/**
* 批量插入 网格相关分值表
*
* @param list
* @param customerId
* @return void
* @Author zhangyong
* @Date 11:11 2020-09-04
**/
void batchInsertGridScoreData(@Param("list") List<FactIndexGridScoreDTO> list,@Param("customerId")String customerId);
} }

57
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java → epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridSubScoreDao.java

@ -15,12 +15,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.epmet.dao.evaluationindex.screen; package com.epmet.dao.evaluationindex.indexcal;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.indexcal.GridScoreDTO;
import com.epmet.dto.screen.FactIndexGridScoreDTO; import com.epmet.dto.screen.FactIndexGridScoreDTO;
import com.epmet.dto.screen.result.SubGridAvgResultDTO; import com.epmet.dto.screen.result.SubGridAvgResultDTO;
import com.epmet.entity.evaluationindex.screen.FactIndexGridScoreEntity; import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -30,39 +32,73 @@ import java.util.List;
* 网格相关分值 * 网格相关分值
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-28 * @since v1.0.0 2020-08-31
*/ */
@Mapper @Mapper
public interface FactIndexGridScoreDao extends BaseDao<FactIndexGridScoreEntity> { public interface GridSubScoreDao extends BaseDao<GridScoreEntity> {
/**
* @param customerId
* @param monthId
* @param indexCode
* @param isTotal 1总分0不是
* @return int
* @author yinzuomei
* @description
* @Date 2020/8/31 14:00
**/
int deleteByCusAndMonthId(@Param("customerId") String customerId,
@Param("monthId") String monthId,
@Param("indexCode") String indexCode,
@Param("isTotal") String isTotal);
/**
* @param gridScoreEntityList
* @return int
* @author yinzuomei
* @description
* @Date 2020/8/31 14:01
**/
int insertBatches(List<GridScoreEntity> gridScoreEntityList);
/**
* @param formDTO
* @return java.util.List<com.epmet.dto.indexcal.GridScoreDTO>
* @author yinzuomei
* @description
* @Date 2020/8/31 16:42
**/
List<GridScoreDTO> selectList(CalculateCommonFormDTO formDTO);
/** /**
* @Description 下属所有网格的平均值
* @param customerId * @param customerId
* @param monthId * @param monthId
* @Description 下属所有网格的平均值
* @author zxc * @author zxc
* @date 2020/8/28 3:20 下午 * @date 2020/8/28 3:20 下午
*/ */
List<SubGridAvgResultDTO> selectSubGridAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); List<SubGridAvgResultDTO> selectSubGridAvgScore(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("indexCode") String indexCode);
/** /**
* 根据入参查询 网格相关分值记录 * 根据入参查询 网格相关分值记录
*
* @param customerId * @param customerId
* @param monthId * @param monthId
* @return java.util.List<com.epmet.dto.screen.FactIndexGridScoreDTO> * @return java.util.List<com.epmet.dto.screen.FactIndexGridScoreDTO>
* @Author zhangyong * @Author zhangyong
* @Date 10:43 2020-09-03 * @Date 10:43 2020-09-03
**/ **/
List<FactIndexGridScoreDTO> selectListGridScore(@Param("customerId")String customerId, @Param("monthId")String monthId); List<FactIndexGridScoreDTO> selectListGridScore(@Param("customerId") String customerId, @Param("monthId") String monthId);
/** /**
* 根据入参查询 网格id * 根据入参查询 网格id
*
* @param customerId * @param customerId
* @param monthId * @param monthId
* @return java.util.List<java.util.String> * @return java.util.List<java.util.String>
* @Author zhangyong * @Author zhangyong
* @Date 10:43 2020-09-03 * @Date 10:43 2020-09-03
**/ **/
List<String> selectListGridId(@Param("customerId")String customerId, @Param("monthId")String monthId); List<String> selectListGridId(@Param("customerId") String customerId, @Param("monthId") String monthId);
/** /**
* 批量插入 网格相关分值表 * 批量插入 网格相关分值表
@ -73,5 +109,6 @@ public interface FactIndexGridScoreDao extends BaseDao<FactIndexGridScoreEntity>
* @Author zhangyong * @Author zhangyong
* @Date 11:11 2020-09-04 * @Date 11:11 2020-09-04
**/ **/
void batchInsertGridScoreData(@Param("list") List<FactIndexGridScoreDTO> list,@Param("customerId")String customerId); void batchInsertGridScoreData(@Param("list") List<FactIndexGridScoreDTO> list, @Param("customerId") String customerId);
}
}

16
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java

@ -37,24 +37,16 @@ import java.util.Map;
public interface FactIndexGovrnAblityDeptMonthlyDao extends BaseDao<FactIndexGovrnAblityDeptMonthlyEntity> { public interface FactIndexGovrnAblityDeptMonthlyDao extends BaseDao<FactIndexGovrnAblityDeptMonthlyEntity> {
/** /**
* 8治理能力-部门相关指标 * 8治理能力-部门相关指标
* 据CUSTOMER_IDAGENCY_IDDEPT_IDYEAR_IDMONTH_IDQUARTER_ID进行查询如果有数据则先进行物理删除 * 据CUSTOMER_IDMONTH_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param agencyId
* @param deptId
* @param yearId
* @param monthId * @param monthId
* @param quarterId * @return java.util.Integer
* @param customerId
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-20 * @Date 10:52 2020-08-20
**/ **/
void deleteFactIndexGovrnAblityDeptMonthly(@Param("customerId") String customerId, Integer deleteFactIndexGovrnAblityDeptMonthly(@Param("customerId") String customerId,
@Param("agencyId") String agencyId, @Param("monthId") String monthId);
@Param("deptId") String deptId,
@Param("yearId") String yearId,
@Param("monthId") String monthId,
@Param("quarterId") String quarterId);
/** /**
* 8治理能力-部门相关指标 * 8治理能力-部门相关指标

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

@ -47,15 +47,12 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao<FactIndexGov
* @param yearId * @param yearId
* @param monthId * @param monthId
* @param quarterId * @param quarterId
* @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-20 * @Date 10:52 2020-08-20
**/ **/
void deleteFactIndexGovrnAblityGridMonthly(@Param("customerId") String customerId, Integer deleteFactIndexGovrnAblityGridMonthly(@Param("customerId") String customerId,
@Param("agencyId") String agencyId, @Param("monthId") String monthId);
@Param("gridId") String gridId,
@Param("yearId") String yearId,
@Param("monthId") String monthId,
@Param("quarterId") String quarterId);
/** /**
* 6治理能力-网格相关指标 * 6治理能力-网格相关指标
@ -92,7 +89,7 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao<FactIndexGov
* @param formDTO * @param formDTO
* @author yinzuomei * @author yinzuomei
* @description 查询治理能力-网格相关事实表当前月共上传了多少条记录 * @description 查询治理能力-网格相关事实表当前月共上传了多少条记录
* @Date 2020/8/31 14:31 * @Date 2020/8/31 14:31
**/ **/
int selectCount(CalculateCommonFormDTO formDTO); int selectCount(CalculateCommonFormDTO formDTO);

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java

@ -36,21 +36,16 @@ import java.util.Map;
public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao<FactIndexGovrnAblityOrgMonthlyEntity> { public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao<FactIndexGovrnAblityOrgMonthlyEntity> {
/** /**
* 7治理能力-街道及社区相关指标 * 7治理能力-街道及社区相关指标
* 据CUSTOMER_IDAGENCY_IDYEAR_IDMONTH_IDQUARTER_ID进行查询如果有数据则先进行物理删除 * 据CUSTOMER_IDMONTH_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param yearId
* @param monthId * @param monthId
* @param quarterId * @return java.util.Integer
* @param agencyIds
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-20 * @Date 10:52 2020-08-20
**/ **/
void deleteFactIndexGovrnAblityOrgMonthly(@Param("customerId") String customerId, Integer deleteFactIndexGovrnAblityOrgMonthly(@Param("customerId") String customerId,
@Param("yearId") String yearId, @Param("monthId") String monthId);
@Param("monthId") String monthId,
@Param("quarterId") String quarterId,
@Param("agencyIds") String[] agencyIds);
/** /**
* 7治理能力-街道及社区相关指标 * 7治理能力-街道及社区相关指标

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java

@ -39,23 +39,16 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao<FactIndexPar
/** /**
* 2党建能力-网格相关指标上报(按照月份) * 2党建能力-网格相关指标上报(按照月份)
* 1) 根据CUSTOMER_IDAGENCY_IDGRID_IDYEAR_IDMONTH_IDQUARTER_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_IDMONTH_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param agencyId
* @param gridId
* @param yearId
* @param monthId * @param monthId
* @param quarterId * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-20 * @Date 10:52 2020-08-20
**/ **/
void deleteFactIndexPartyAblityGridMonthly(@Param("customerId") String customerId, Integer deleteFactIndexPartyAblityGridMonthly(@Param("customerId") String customerId,
@Param("agencyId") String agencyId, @Param("monthId") String monthId);
@Param("gridId") String gridId,
@Param("yearId") String yearId,
@Param("monthId") String monthId,
@Param("quarterId") String quarterId);
/** /**
* 2党建能力-网格相关指标上报(按照月份) * 2党建能力-网格相关指标上报(按照月份)

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java

@ -38,21 +38,16 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao<FactIndexPart
/** /**
* 3党建能力-街道及社区相关指标 * 3党建能力-街道及社区相关指标
* 根据CUSTOMER_IDAGENCY_IDYEAR_IDMONTH_IDQUARTER_ID进行查询如果有数据则先进行物理删除 * 根据CUSTOMER_IDMONTH_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param yearId
* @param monthId * @param monthId
* @param quarterId * @return java.util.Integer
* @param agencyIds
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-20 * @Date 10:52 2020-08-20
**/ **/
void deleteFactIndexPartyAblityOrgMonthly(@Param("customerId") String customerId, Integer deleteFactIndexPartyAblityOrgMonthly(@Param("customerId") String customerId,
@Param("yearId") String yearId, @Param("monthId") String monthId);
@Param("monthId") String monthId,
@Param("quarterId") String quarterId,
@Param("agencyIds") String[] agencyIds);
/** /**
* 3党建能力-街道及社区相关指标 * 3党建能力-街道及社区相关指标

17
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java

@ -38,23 +38,16 @@ import java.util.Map;
public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao<FactIndexServiceAblityGridMonthlyEntity> { public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao<FactIndexServiceAblityGridMonthlyEntity> {
/** /**
* 4服务能力-网格相关指标 * 4服务能力-网格相关指标
* 根据CUSTOMER_IDAGENCY_IDGRID_IDYEAR_IDMONTH_IDQUARTER_ID进行查询如果有数据则先进行物理删除 * 根据CUSTOMER_IDMONTH_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param agencyId
* @param gridId
* @param yearId
* @param monthId * @param monthId
* @param quarterId * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-20 * @Date 10:52 2020-08-20
**/ **/
void deleteFactIndexServiceAblityGridMonthly(@Param("customerId") String customerId, Integer deleteFactIndexServiceAblityGridMonthly(@Param("customerId") String customerId,
@Param("agencyId") String agencyId, @Param("monthId") String monthId);
@Param("gridId") String gridId,
@Param("yearId") String yearId,
@Param("monthId") String monthId,
@Param("quarterId") String quarterId);
/** /**
* 4服务能力-网格相关指标 * 4服务能力-网格相关指标
@ -91,7 +84,7 @@ public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao<FactIndexS
* @param formDTO * @param formDTO
* @author yinzuomei * @author yinzuomei
* @description 查询服务能力-网格相关事实表共上传记录数 * @description 查询服务能力-网格相关事实表共上传记录数
* @Date 2020/9/2 14:28 * @Date 2020/9/2 14:28
**/ **/
int selectCount(CalculateCommonFormDTO formDTO); int selectCount(CalculateCommonFormDTO formDTO);

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java

@ -38,21 +38,16 @@ public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao<FactIndexSe
/** /**
* 5服务能力-组织街道|社区|全区相关指标 * 5服务能力-组织街道|社区|全区相关指标
* 根据CUSTOMER_IDAGENCY_IDYEAR_IDMONTH_IDQUARTER_ID进行查询如果有数据则先进行物理删除 * 根据CUSTOMER_IDMONTH_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param yearId
* @param monthId * @param monthId
* @param quarterId * @return java.util.Integer
* @param agencyIds
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-20 * @Date 10:52 2020-08-20
**/ **/
void deleteFactIndexServiceAblityOrgMonthly(@Param("customerId") String customerId, Integer deleteFactIndexServiceAblityOrgMonthly(@Param("customerId") String customerId,
@Param("yearId") String yearId, @Param("monthId") String monthId);
@Param("monthId") String monthId,
@Param("quarterId") String quarterId,
@Param("agencyIds") String[] agencyIds);
/** /**
* 5服务能力-组织街道|社区|全区相关指标 * 5服务能力-组织街道|社区|全区相关指标

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

@ -36,15 +36,14 @@ public interface ScreenCpcBaseDataDao extends BaseDao<ScreenCpcBaseDataEntity> {
/** /**
* 2党员基本情况 * 2党员基本情况
* 1) 根据CUSTOMER_IDORG_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param orgIds 组织Id集合 * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deleteCpcBaseData(@Param("customerId") String customerId, Integer deleteCpcBaseData(@Param("customerId") String customerId);
@Param("orgIds") String[] orgIds);
/** /**
* 2党员基本情况 * 2党员基本情况

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

@ -35,15 +35,14 @@ import java.util.List;
public interface ScreenCustomerAgencyDao extends BaseDao<ScreenCustomerAgencyEntity> { public interface ScreenCustomerAgencyDao extends BaseDao<ScreenCustomerAgencyEntity> {
/** /**
*14组织层级 *14组织层级
* 1) 根据CUSTOMER_IDAGENCY_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_ID 进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param agencyIds 组织id集合 * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deleteCustomerAgency(@Param("customerId") String customerId, Integer deleteCustomerAgency(@Param("customerId") String customerId);
@Param("agencyIds") String[] agencyIds);
/** /**
* 14组织层级 * 14组织层级
@ -75,4 +74,12 @@ public interface ScreenCustomerAgencyDao extends BaseDao<ScreenCustomerAgencyEnt
* @Date 16:57 2020-09-03 * @Date 16:57 2020-09-03
**/ **/
List<ScreenCustomerAgencyEntity> selectListAgencyInfo(@Param("customerId")String customerId); List<ScreenCustomerAgencyEntity> selectListAgencyInfo(@Param("customerId")String customerId);
/**
* @Description 根据agencyId查询上级组织Id
* @param agencyId
* @author zxc
* @date 2020/9/8 3:36 下午
*/
String selectPid(@Param("agencyId")String agencyId);
} }

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java

@ -36,15 +36,14 @@ public interface ScreenCustomerDeptDao extends BaseDao<ScreenCustomerDeptEntity>
/** /**
*16部门信息上传 *16部门信息上传
* 1) 根据CUSTOMER_IDDEPT_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_ID 进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param deptIds 部门Id集合 * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deleteCustomerDept(@Param("customerId") String customerId, Integer deleteCustomerDept(@Param("customerId") String customerId);
@Param("deptIds") String[] deptIds);
/** /**
* 16部门信息上传 * 16部门信息上传

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

@ -37,15 +37,14 @@ import java.util.List;
public interface ScreenCustomerGridDao extends BaseDao<ScreenCustomerGridEntity> { public interface ScreenCustomerGridDao extends BaseDao<ScreenCustomerGridEntity> {
/** /**
*15网格信息上传 *15网格信息上传
* 1) 根据CUSTOMER_IDGRID_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_ID 进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param gridIds 网格Id集合 * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deleteCustomerGrid(@Param("customerId") String customerId, Integer deleteCustomerGrid(@Param("customerId") String customerId);
@Param("gridIds") String[] gridIds);
/** /**
* 15网格信息上传 * 15网格信息上传

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

@ -36,7 +36,7 @@ import java.util.List;
public interface ScreenDifficultyDataDao extends BaseDao<ScreenDifficultyDataEntity> { public interface ScreenDifficultyDataDao extends BaseDao<ScreenDifficultyDataEntity> {
/** /**
* 3难点赌点 * 3难点赌点
* 1) 根据CUSTOMER_IDEVENT_IDORG_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_ID进行查询如果有数据则先进行物理删除
* @param customerId * @param customerId
* @Author zhangyong * @Author zhangyong

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

@ -35,17 +35,14 @@ import java.util.List;
public interface ScreenEventDataDao extends BaseDao<ScreenEventDataEntity> { public interface ScreenEventDataDao extends BaseDao<ScreenEventDataEntity> {
/** /**
* 4事件数据 * 4事件数据
* 1) 根据CUSTOMER_IDEVENT_IDORG_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param eventId * @return java.util.Integer
* @param orgId
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deleteEventData(@Param("customerId")String customerId, Integer deleteEventData(@Param("customerId")String customerId);
@Param("eventId")String eventId,
@Param("orgId")String orgId);
/** /**
* 4事件数据 * 4事件数据

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

@ -22,6 +22,8 @@ import com.epmet.entity.evaluationindex.screen.ScreenEventImgDataEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 中央区-事件数据图片数据 * 中央区-事件数据图片数据
* *
@ -34,10 +36,12 @@ public interface ScreenEventImgDataDao extends BaseDao<ScreenEventImgDataEntity>
/** /**
* 根据原始事件Id进行物理删除 * 根据原始事件Id进行物理删除
* *
* @param eventId * @param eventIds
* @return void * @return void
* @Author zhangyong * @Author zhangyong
* @Date 16:47 2020-08-18 * @Date 16:47 2020-08-18
**/ **/
void delEventImgDataByEventId(@Param("eventId") String eventId); void delEventImgDataByEvent(@Param("eventIds") String[] eventIds);
void batchInsertEventImgData(@Param("list") List<ScreenEventImgDataEntity> list);
} }

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

@ -35,19 +35,16 @@ import java.util.List;
public interface ScreenGovernRankDataDao extends BaseDao<ScreenGovernRankDataEntity> { public interface ScreenGovernRankDataDao extends BaseDao<ScreenGovernRankDataEntity> {
/** /**
* 5基层治理-治理能力数据 * 5基层治理-治理能力数据
* 1) 根据CUSTOMER_IDYEAR_IDMONTH_IDORG_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_IDMONTH_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param yearId
* @param monthId * @param monthId
* @param orgIds 组织Id集合 * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deleteGovernRankData(@Param("customerId") String customerId, Integer deleteGovernRankData(@Param("customerId") String customerId,
@Param("yearId") String yearId, @Param("monthId") String monthId);
@Param("monthId") String monthId,
@Param("orgIds") String[] orgIds);
/** /**
* 5基层治理-治理能力数据 * 5基层治理-治理能力数据

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java

@ -36,19 +36,16 @@ public interface ScreenIndexDataMonthlyDao extends BaseDao<ScreenIndexDataMonthl
/** /**
*1指数相关 *1指数相关
* 1) 根据CUSTOMER_IDYEAR_IDMONTH_IDORG_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_IDMONTH_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param yearId
* @param monthId * @param monthId
* @param orgIds 组织Id集合 * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deleteIndexDataMonthly(@Param("customerId") String customerId, Integer deleteIndexDataMonthly(@Param("customerId") String customerId,
@Param("yearId") String yearId, @Param("monthId") String monthId);
@Param("monthId") String monthId,
@Param("orgIds") String[] orgIds);
/** /**
* 1指数相关 * 1指数相关

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

@ -36,17 +36,16 @@ public interface ScreenIndexDataYearlyDao extends BaseDao<ScreenIndexDataYearlyE
/** /**
* 17指数_按年统计 * 17指数_按年统计
* 1) 根据CUSTOMER_IDYEAR_IDORG_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_IDYEAR_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param yearId * @param yearId
* @param orgIds 组织Id集合 * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deleteIndexDataYearly(@Param("customerId") String customerId, Integer deleteIndexDataYearly(@Param("customerId") String customerId,
@Param("yearId") String yearId, @Param("yearId") String yearId);
@Param("orgIds") String[] orgIds);
/** /**
* 17指数_按年统计 * 17指数_按年统计

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java

@ -35,19 +35,16 @@ import java.util.List;
public interface ScreenOrgRankDataDao extends BaseDao<ScreenOrgRankDataEntity> { public interface ScreenOrgRankDataDao extends BaseDao<ScreenOrgRankDataEntity> {
/** /**
* 6党建引领-组织排行 * 6党建引领-组织排行
* 1) 根据CUSTOMER_IDYEAR_IDMONTH_IDORG_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_IDMONTH_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param yearId
* @param monthId * @param monthId
* @param orgIds 组织Id集合 * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deleteOrgRankData(@Param("customerId") String customerId, Integer deleteOrgRankData(@Param("customerId") String customerId,
@Param("yearId") String yearId, @Param("monthId") String monthId);
@Param("monthId") String monthId,
@Param("orgIds") String[] orgIds);
/** /**
* 6党建引领-组织排行 * 6党建引领-组织排行

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

@ -35,19 +35,16 @@ import java.util.List;
public interface ScreenPartyBranchDataDao extends BaseDao<ScreenPartyBranchDataEntity> { public interface ScreenPartyBranchDataDao extends BaseDao<ScreenPartyBranchDataEntity> {
/** /**
* 7基层党建-建设情况数据支部联建志愿 * 7基层党建-建设情况数据支部联建志愿
* 1) 根据CUSTOMER_IDYEAR_IDMONTH_IDORG_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_IDMONTH_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param yearId
* @param monthId * @param monthId
* @param orgIds 组织Id集合 * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deletePartyBranchData(@Param("customerId") String customerId, Integer deletePartyBranchData(@Param("customerId") String customerId,
@Param("yearId") String yearId, @Param("monthId") String monthId);
@Param("monthId") String monthId,
@Param("orgIds") String[] orgIds);
/** /**
* 7基层党建-建设情况数据支部联建志愿 * 7基层党建-建设情况数据支部联建志愿

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

@ -36,15 +36,14 @@ public interface ScreenPartyLinkMassesDataDao extends BaseDao<ScreenPartyLinkMas
/** /**
* 8党建引领-党员联系群众数据 * 8党建引领-党员联系群众数据
* 1) 根据CUSTOMER_IDORG_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param orgIds 组织Id集合 * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deletePartyLinkMassesData(@Param("customerId") String customerId, Integer deletePartyLinkMassesData(@Param("customerId") String customerId);
@Param("orgIds") String[] orgIds);
/** /**
* 8党建引领-党员联系群众数据 * 8党建引领-党员联系群众数据

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

@ -36,17 +36,14 @@ public interface ScreenPartyUserRankDataDao extends BaseDao<ScreenPartyUserRankD
/** /**
* 9党建引领|基层治理-居民党员积分排行榜 * 9党建引领|基层治理-居民党员积分排行榜
* 1) 根据CUSTOMER_IDGRID_IDUSER_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param gridId * @return java.util.Integer
* @param userId
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deletePartyUserRankData(@Param("customerId") String customerId, Integer deletePartyUserRankData(@Param("customerId") String customerId);
@Param("gridId") String gridId,
@Param("userId") String userId);
/** /**
* 9党建引领|基层治理-居民党员积分排行榜 * 9党建引领|基层治理-居民党员积分排行榜

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

@ -36,15 +36,14 @@ public interface ScreenPioneerDataDao extends BaseDao<ScreenPioneerDataEntity> {
/** /**
* 10党建引领-先锋模范数据 * 10党建引领-先锋模范数据
* 1) 根据CUSTOMER_IDORG_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param orgIds 组织Id集合 * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deletePioneerData(@Param("customerId") String customerId, Integer deletePioneerData(@Param("customerId") String customerId);
@Param("orgIds") String[] orgIds);
/** /**
* 10党建引领-先锋模范数据 * 10党建引领-先锋模范数据

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java

@ -37,15 +37,14 @@ public interface ScreenPublicPartiTotalDataDao extends BaseDao<ScreenPublicParti
/** /**
* 18公众参与各类总数 * 18公众参与各类总数
* 公众参与-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数 * 公众参与-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数
* 1) 根据CUSTOMER_IDORG_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param orgIds 组织Id集合 * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-25 * @Date 10:52 2020-08-25
**/ **/
void deletePublicPartiTotalData(@Param("customerId") String customerId, Integer deletePublicPartiTotalData(@Param("customerId") String customerId);
@Param("orgIds") String[] orgIds);
/** /**
* 18公众参与各类总数 * 18公众参与各类总数

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java

@ -51,19 +51,16 @@ public interface ScreenUserJoinDao extends BaseDao<ScreenUserJoinEntity> {
/** /**
* 11基层治理-公众参与 * 11基层治理-公众参与
* 1) 根据CUSTOMER_IDYEAR_IDMONTH_IDORG_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_IDMONTH_ID进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param yearId
* @param monthId * @param monthId
* @param orgIds 组织Id集合 * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deleteUserJoin(@Param("customerId") String customerId, Integer deleteUserJoin(@Param("customerId") String customerId,
@Param("yearId") String yearId, @Param("monthId") String monthId);
@Param("monthId") String monthId,
@Param("orgIds") String[] orgIds);
/** /**
* 11基层治理-公众参与 * 11基层治理-公众参与

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

@ -36,15 +36,14 @@ public interface ScreenUserTotalDataDao extends BaseDao<ScreenUserTotalDataEntit
/** /**
* 12中央区各类总数 * 12中央区各类总数
* 1) 根据CUSTOMER_IDORG_ID进行查询如果有数据则先进行物理删除 * 1) 根据CUSTOMER_ID 进行查询如果有数据则先进行物理删除, 一次删除1000条
* *
* @param customerId * @param customerId
* @param orgIds 组织Id集合 * @return java.util.Integer
* @Author zhangyong * @Author zhangyong
* @Date 10:52 2020-08-18 * @Date 10:52 2020-08-18
**/ **/
void deleteUserTotalData(@Param("customerId") String customerId, Integer deleteUserTotalData(@Param("customerId") String customerId);
@Param("orgIds") String[] orgIds);
/** /**
* 12中央区各类总数 * 12中央区各类总数

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

@ -0,0 +1,90 @@
/**
* 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-02
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("fact_index_sub_agency_score")
public class AgencySubScoreEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 组织id(eg社区或者街道id)
*/
private String agencyId;
/**
* 上级组织id
*/
private String parentAgencyId;
/**
* 年度ID: yyyy
*/
private String yearId;
/**
* 季度id: yyyyQ1yyyyQ2yyyyQ3yyyyQ4
*/
private String quarterId;
/**
* 月维度Id: yyyyMM
*/
private String monthId;
/**
* 1总分0不是默认0
*/
private String isTotal;
/**
* 分值
*/
private BigDecimal score;
/**
* 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli街道相关jiedaoxiangguan全区相关:quanquxiangguan
*/
private String indexCode;
/**
* 数据类型 district 全区street街道
*/
private String dataType;
}

17
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java

@ -71,15 +71,20 @@ public class CpcScoreEntity extends BaseEpmetEntity {
/** /**
* 分值 * 分值
*/ */
private BigDecimal score; private BigDecimal score;
/** /**
* 指标code * 指标code
*/ */
private String indexCode; private String indexCode;
/** /**
* 是否是总分 1是0不是 * 所有指标code拼接的字符串 冒号隔开
*/ */
private String isTotal; private String allParentIndexCode;
/**
* 是否是总分 1是0不是
*/
private String isTotal;
} }

90
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java

@ -0,0 +1,90 @@
/**
* 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-08-31
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("fact_index_sub_cpc_score")
public class CpcSubScoreEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 网格所属的机关Id
*/
private String agencyId;
/**
* 网格Id
*/
private String gridId;
/**
* 年维度Id: yyyy
*/
private String yearId;
/**
* 月维度Id: yyyyMM
*/
private String monthId;
/**
* 用户id
*/
private String userId;
/**
* 分值
*/
private BigDecimal score;
/**
* 指标code
*/
private String indexCode;
/**
* 所有指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
/**
* 是否是总分 1是0不是
*/
private String isTotal;
}

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java

@ -75,11 +75,16 @@ public class DeptScoreEntity extends BaseEpmetEntity {
/** /**
* 分值 * 分值
*/ */
private BigDecimal score; private BigDecimal score;
/** /**
* 治理能力zhilinengli * 治理能力zhilinengli
*/ */
private String indexCode; private String indexCode;
/**
* 所有指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
} }

90
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java

@ -0,0 +1,90 @@
/**
* 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-02
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("fact_index_sub_dept_score")
public class DeptSubScoreEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 部门id
*/
private String deptId;
/**
* 部门所属的组织id
*/
private String agencyId;
/**
* 季度id: yyyyQ1yyyyQ2yyyyQ3yyyyQ4
*/
private String quarterId;
/**
* 年度ID: yyyy
*/
private String yearId;
/**
* 月维度Id: yyyyMM
*/
private String monthId;
/**
* 1总分0不是默认0
*/
private String isTotal;
/**
* 分值
*/
private BigDecimal score;
/**
* 治理能力zhilinengli
*/
private String indexCode;
/**
* 所有指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
}

23
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java

@ -77,14 +77,19 @@ public class GridScoreEntity extends BaseEpmetEntity {
*/ */
private String isTotal; private String isTotal;
/** /**
* 分值 * 分值
*/ */
private BigDecimal score; private BigDecimal score;
/** /**
* 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli网格相关wanggexiangguan * 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli网格相关wanggexiangguan
*/ */
private String indexCode; private String indexCode;
/**
* 所有指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
} }

95
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.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-08-31
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("fact_index_sub_grid_score")
public class GridSubScoreEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 网格Id
*/
private String gridId;
/**
* 网格所属的机关Id
*/
private String agencyId;
/**
* 所有上级ID用英文逗号分开
*/
private String allParentIds;
/**
* 季度id: yyyyQ1yyyyQ2yyyyQ3yyyyQ4
*/
private String quarterId;
/**
* 年度ID: yyyy
*/
private String yearId;
/**
* 月维度Id: yyyyMM
*/
private String monthId;
/**
* 1总分0不是
*/
private String isTotal;
/**
* 分值
*/
private BigDecimal score;
/**
* 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli网格相关wanggexiangguan
*/
private String indexCode;
/**
* 所有指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
}

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java

@ -75,11 +75,16 @@ public class FactIndexCommunityScoreEntity extends BaseEpmetEntity {
/** /**
* 分值 * 分值
*/ */
private BigDecimal score; private BigDecimal score;
/** /**
* 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli社区相关shequxiangguan * 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli社区相关shequxiangguan
*/ */
private String indexCode; private String indexCode;
/**
* 所有指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
} }

23
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java

@ -35,19 +35,24 @@ public class IndexDictEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 指标名 * 指标名
*/ */
private String indexName; private String indexName;
/** /**
* 指标描述 * 指标编码
*/ */
private String indexCode;
/**
* 指标描述
*/
private String indexDesc; private String indexDesc;
/** /**
* 指标级别1,2,3,4,5 * 指标级别1,2,3,4,5
*/ */
private String level; private String level;
/** /**

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java

@ -266,6 +266,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
entity.setIndexName(data.getLevel1Index()); entity.setIndexName(data.getLevel1Index());
entity.setCorrelation(data.getCorrelation()); entity.setCorrelation(data.getCorrelation());
entity.setLevel("1"); entity.setLevel("1");
entity.setIndexCode(Pinyin4jUtil.getSpellPinYin(data.getLevel1Index(), false, 4));
indexDicMap.put(data.getLevel1Index(), entity); indexDicMap.put(data.getLevel1Index(), entity);
} }
if (!indexDicMap.containsKey(data.getLevel2Index())) { if (!indexDicMap.containsKey(data.getLevel2Index())) {
@ -273,6 +274,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
entity2.setIndexName(data.getLevel2Index()); entity2.setIndexName(data.getLevel2Index());
entity2.setCorrelation(data.getCorrelation()); entity2.setCorrelation(data.getCorrelation());
entity2.setLevel("2"); entity2.setLevel("2");
entity2.setIndexCode(Pinyin4jUtil.getSpellPinYin(data.getLevel2Index(), false, 4));
indexDicMap.put(data.getLevel2Index(), entity2); indexDicMap.put(data.getLevel2Index(), entity2);
} }
if (!indexDicMap.containsKey(data.getLevel3Index())) { if (!indexDicMap.containsKey(data.getLevel3Index())) {
@ -280,6 +282,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
entity3.setIndexName(data.getLevel3Index()); entity3.setIndexName(data.getLevel3Index());
entity3.setCorrelation(data.getCorrelation()); entity3.setCorrelation(data.getCorrelation());
entity3.setLevel("3"); entity3.setLevel("3");
entity3.setIndexCode(Pinyin4jUtil.getSpellPinYin(data.getLevel3Index(), false, 4));
indexDicMap.put(data.getLevel3Index(), entity3); indexDicMap.put(data.getLevel3Index(), entity3);
} }
if (!indexDicMap.containsKey(data.getLevel4Index())) { if (!indexDicMap.containsKey(data.getLevel4Index())) {
@ -287,6 +290,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
entity4.setIndexName(data.getLevel4Index()); entity4.setIndexName(data.getLevel4Index());
entity4.setCorrelation(data.getCorrelation()); entity4.setCorrelation(data.getCorrelation());
entity4.setLevel("4"); entity4.setLevel("4");
entity4.setIndexCode(Pinyin4jUtil.getSpellPinYin(data.getLevel4Index(), false, 4));
indexDicMap.put(data.getLevel4Index(), entity4); indexDicMap.put(data.getLevel4Index(), entity4);
} }
if (!indexDicMap.containsKey(data.getLevel5Index())) { if (!indexDicMap.containsKey(data.getLevel5Index())) {
@ -294,6 +298,7 @@ public class IndexExcelDataListener extends AnalysisEventListener<IndexModel> {
entity5.setIndexName(data.getLevel5Index()); entity5.setIndexName(data.getLevel5Index());
entity5.setCorrelation(data.getCorrelation()); entity5.setCorrelation(data.getCorrelation());
entity5.setLevel("5"); entity5.setLevel("5");
entity5.setIndexCode(Pinyin4jUtil.getSpellPinYin(data.getLevel5Index(), false, 4));
indexDicMap.put(data.getLevel5Index(), entity5); indexDicMap.put(data.getLevel5Index(), entity5);
} }
} }

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java

@ -1,6 +1,6 @@
package com.epmet.service.evaluationindex.indexcal; package com.epmet.service.evaluationindex.indexcal;
import com.epmet.dto.screen.form.IndexCalculateForm; import com.epmet.dto.indexcal.CalculateCommonFormDTO;
/** /**
* 指标计算service * 指标计算service
@ -11,8 +11,9 @@ import com.epmet.dto.screen.form.IndexCalculateForm;
public interface IndexCalculateService { public interface IndexCalculateService {
/** /**
* desc按照客户计算所有指标(按照月份) * desc按照客户计算所有指标(按照月份)
*
* @param formDTO * @param formDTO
* @return * @return
*/ */
Boolean indexCalculate(IndexCalculateForm formDTO); Boolean indexCalculate(CalculateCommonFormDTO formDTO);
} }

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

@ -9,9 +9,11 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.DataSourceConstant; import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant; import com.epmet.constant.IndexCalConstant;
import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao;
import com.epmet.dao.evaluationindex.indexcal.CpcSubScoreDao;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao;
import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity; import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity;
import com.epmet.entity.evaluationindex.indexcal.CpcSubScoreEntity;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity;
import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity;
import com.epmet.eum.IndexCodeEnum; import com.epmet.eum.IndexCodeEnum;
@ -23,6 +25,7 @@ import com.epmet.support.normalizing.Correlation;
import com.epmet.support.normalizing.ScoreCalculator; import com.epmet.support.normalizing.ScoreCalculator;
import com.epmet.support.normalizing.ScoreConstants; import com.epmet.support.normalizing.ScoreConstants;
import com.epmet.support.normalizing.batch.BatchScoreCalculator; import com.epmet.support.normalizing.batch.BatchScoreCalculator;
import com.epmet.support.normalizing.batch.CalculateResult;
import com.epmet.support.normalizing.batch.IndexInputVO; import com.epmet.support.normalizing.batch.IndexInputVO;
import com.epmet.support.normalizing.batch.SampleValue; import com.epmet.support.normalizing.batch.SampleValue;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -48,6 +51,8 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
private IndexCodeFieldReService indexCodeFieldReService; private IndexCodeFieldReService indexCodeFieldReService;
@Autowired @Autowired
private CpcScoreDao cpcScoreDao; private CpcScoreDao cpcScoreDao;
@Autowired
private CpcSubScoreDao cpcSubScoreDao;
@Override @Override
public Boolean cpcIndexCalculate(CalculateCommonFormDTO formDTO) { public Boolean cpcIndexCalculate(CalculateCommonFormDTO formDTO) {
@ -72,7 +77,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
Map<String, IndexGroupDetailEntity> indexWeightMap = parentIndexDetails.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, o -> o)); Map<String, IndexGroupDetailEntity> indexWeightMap = parentIndexDetails.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, o -> o));
//获取数据 //获取数据
List<CpcScoreEntity> list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId()); List<CpcScoreEntity> list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode());
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
log.error("calculateTotalScore cpcScoreDao.getPartScore return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); log.error("calculateTotalScore cpcScoreDao.getPartScore return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId());
throw new RenException("客户四级指标分值记录不存在"); throw new RenException("客户四级指标分值记录不存在");
@ -82,11 +87,16 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
CpcScoreEntity totalEntity = null; CpcScoreEntity totalEntity = null;
for (CpcScoreEntity part : partScoreList) { for (CpcScoreEntity part : partScoreList) {
IndexGroupDetailEntity indexGroupDetailEntity = indexWeightMap.get(part.getIndexCode()); IndexGroupDetailEntity indexGroupDetailEntity = indexWeightMap.get(part.getIndexCode());
if (indexGroupDetailEntity == null) {
log.error(" indexCode:{} 在指标明细中不存在", part.getIndexCode());
continue;
}
if (totalEntity == null) { if (totalEntity == null) {
totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class);
totalEntity.setIsTotal(NumConstant.ONE_STR); totalEntity.setIsTotal(NumConstant.ONE_STR);
totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode());
totalEntity.setScore(new BigDecimal(0)); totalEntity.setScore(new BigDecimal(0));
totalEntity.setAllParentIndexCode(indexGroupDetailEntity.getAllParentIndexCode());
cpcScoreTotalMap.put(userId, totalEntity); cpcScoreTotalMap.put(userId, totalEntity);
} }
//自建群活跃度——议题转项目率 有阈值 >60%按60%算 //自建群活跃度——议题转项目率 有阈值 >60%按60%算
@ -130,6 +140,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
* @param indexCode 指标code 非必填 * @param indexCode 指标code 非必填
* @param values * @param values
*/ */
@Transactional(rollbackFor = Exception.class)
private void deleteAndInsertBatch(CalculateCommonFormDTO formDTO, Collection<CpcScoreEntity> values, String indexCode) { private void deleteAndInsertBatch(CalculateCommonFormDTO formDTO, Collection<CpcScoreEntity> values, String indexCode) {
cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode); cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode);
cpcScoreDao.insertBatch(values); cpcScoreDao.insertBatch(values);
@ -156,22 +167,11 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
do { do {
list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize);
if (!CollectionUtils.isEmpty(list)) { if (!CollectionUtils.isEmpty(list)) {
//如果是第一页且仅有一条数据 则直接给50分 //遍历指标分组 计算分数
if (pageNo == NumConstant.ONE && list.size() == NumConstant.ONE) { for (Map.Entry<String, List<IndexGroupDetailEntity>> entry : groupIndexDetailsMap.entrySet()) {
List<CpcScoreEntity> insertList = new ArrayList<>(); String indexCode = entry.getKey();
for (String parentIndexCode : groupIndexDetailsMap.keySet()) { List<IndexGroupDetailEntity> details = entry.getValue();
insertList.add(handleOneGridScene(formDTO, parentIndexCode, list.get(0))); calculateScore(formDTO, details, list, minAndMaxMap, indexCode);
}
if (CollectionUtils.isEmpty(insertList)) {
deleteAndInsertBatch(formDTO, insertList, null);
}
} else {
//遍历指标分组 计算分数
for (Map.Entry<String, List<IndexGroupDetailEntity>> entry : groupIndexDetailsMap.entrySet()) {
String parentIndexCode = entry.getKey();
List<IndexGroupDetailEntity> details = entry.getValue();
calculateScore(formDTO, details, list, minAndMaxMap, parentIndexCode);
}
} }
} }
pageNo++; pageNo++;
@ -215,7 +215,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
cpcScoreEntity.setMonthId(formDTO.getMonthId()); cpcScoreEntity.setMonthId(formDTO.getMonthId());
cpcScoreEntity.setScore(new BigDecimal(0)); cpcScoreEntity.setScore(new BigDecimal(0));
cpcScoreEntity.setIndexCode(parentIndexCode); cpcScoreEntity.setIndexCode(parentIndexCode);
cpcScoreEntity.setAllParentIndexCode(value.getAllParentIndexCode());
scoreEntityMap.put(userId, cpcScoreEntity); scoreEntityMap.put(userId, cpcScoreEntity);
//构造样本值对象 //构造样本值对象
@ -224,7 +224,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
} }
} }
log.info("计算的参数:{}", JSON.toJSONString(indexMap)); log.info("计算的参数:{}", JSON.toJSONString(indexMap));
HashMap<String, BigDecimal> result = calculateScore(indexMap); HashMap<String, CalculateResult> result = calculateScore(indexMap);
log.info("计算的结果:{}", result); log.info("计算的结果:{}", result);
//处理结果 //处理结果
@ -244,15 +244,45 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
* @param result * @param result
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void saveCpcScore(CalculateCommonFormDTO formDTO, Map<String, CpcScoreEntity> indexDetails, String parentIndexCode, HashMap<String, BigDecimal> result) { public void saveCpcScore(CalculateCommonFormDTO formDTO, Map<String, CpcScoreEntity> indexDetails, String parentIndexCode, HashMap<String, CalculateResult> result) {
List<CpcScoreEntity> list = new ArrayList<>(); List<CpcScoreEntity> list = new ArrayList<>();
result.forEach((userId, score) -> { List<CpcSubScoreEntity> subList = new ArrayList<>();
String allParentIndexCode = null;
for (Map.Entry<String, CalculateResult> entry : result.entrySet()) {
String userId = entry.getKey();
CalculateResult score = entry.getValue();
CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); CpcScoreEntity cpcScoreEntity = indexDetails.get(userId);
cpcScoreEntity.setScore(score); cpcScoreEntity.setScore(score.getTotalScore());
allParentIndexCode = score.getDetails().get(0).getAllParentIndexCode();
cpcScoreEntity.setAllParentIndexCode(allParentIndexCode.substring(0, allParentIndexCode.lastIndexOf(StrConstant.COLON)));
list.add(cpcScoreEntity); list.add(cpcScoreEntity);
}); CpcScoreEntity parent = ConvertUtils.sourceToTarget(cpcScoreEntity, CpcScoreEntity.class);
score.getDetails().forEach(o -> {
CpcSubScoreEntity child = ConvertUtils.sourceToTarget(parent, CpcSubScoreEntity.class);
child.setIndexCode(o.getIndexCode());
child.setAllParentIndexCode(o.getAllParentIndexCode());
child.setScore(o.getScore());
subList.add(child);
});
}
System.out.println("value:" + JSON.toJSONString(list));
this.deleteAndInsertBatch(formDTO, list, parentIndexCode); this.deleteAndInsertBatch(formDTO, list, parentIndexCode);
this.deleteAndInsertSubBatch(formDTO, subList, allParentIndexCode);
}
/**
* desc:根据客户id和月份Id 指标code 非必填 删除数据
*
* @param formDTO
* @param subList
* @param parentIndexCode 指标code 非必填
*/
@Transactional(rollbackFor = Exception.class)
public void deleteAndInsertSubBatch(CalculateCommonFormDTO formDTO, List<CpcSubScoreEntity> subList, String parentIndexCode) {
cpcSubScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode);
cpcSubScoreDao.insertBatch(subList);
} }
@ -285,7 +315,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey)));
//如果最大值超过阈值 则最大值为阈值 //如果最大值超过阈值 则最大值为阈值
if (new BigDecimal(NumConstant.ONE_NEG).compareTo(index.getThreshold()) != NumConstant.ZERO if (new BigDecimal(NumConstant.ONE_NEG).compareTo(index.getThreshold()) != NumConstant.ZERO
&& maxValue.compareTo(new BigDecimal(NumConstant.ONE_NEG)) == NumConstant.ONE) { && maxValue.compareTo(index.getThreshold()) == NumConstant.ONE) {
maxValue = index.getThreshold(); maxValue = index.getThreshold();
} }
//分值计算器 //分值计算器
@ -295,7 +325,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
ScoreConstants.MAX_SCORE, ScoreConstants.MAX_SCORE,
Correlation.getCorrelation(index.getCorrelation()) Correlation.getCorrelation(index.getCorrelation())
); );
IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), scoreCalculator); IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), index.getAllParentIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), scoreCalculator);
map.put(index.getIndexCode(), indexInputVO); map.put(index.getIndexCode(), indexInputVO);
} }
return map; return map;
@ -307,11 +337,11 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
* @param indexMap * @param indexMap
* @return * @return
*/ */
private HashMap<String, BigDecimal> calculateScore(Map<String, IndexInputVO<BigDecimal>> indexMap) { private HashMap<String, CalculateResult> calculateScore(Map<String, IndexInputVO<BigDecimal>> indexMap) {
//构造入参 //构造入参
List<IndexInputVO> indexInputVOS = indexMap.values().stream().collect(Collectors.toList()); List<IndexInputVO> indexInputVOS = indexMap.values().stream().collect(Collectors.toList());
BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator();
return batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); return batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS);
} }

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

@ -249,6 +249,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
); );
List<SampleValue<BigDecimal>> sampleValueList = new ArrayList<>(); List<SampleValue<BigDecimal>> sampleValueList = new ArrayList<>();
IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(),
index.getAllParentIndexCode(),
sampleValueList, sampleValueList,
index.getThreshold(), index.getThreshold(),
// new BigDecimal("-1"), //FOR TEST // new BigDecimal("-1"), //FOR TEST

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

@ -454,11 +454,12 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
); );
List<SampleValue<BigDecimal>> sampleValueList = new ArrayList<>(); List<SampleValue<BigDecimal>> sampleValueList = new ArrayList<>();
IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(),
sampleValueList, index.getAllParentIndexCode(),
index.getThreshold(), sampleValueList,
index.getThreshold(),
// new BigDecimal("-1"),//FOR TEST // new BigDecimal("-1"),//FOR TEST
index.getWeight(), index.getWeight(),
scoreCalculator); scoreCalculator);
map.put(index.getIndexCode(), indexInputVO1); map.put(index.getIndexCode(), indexInputVO1);
} }
return map; return map;

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

@ -8,11 +8,11 @@ import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant; import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.IndexCalConstant; import com.epmet.constant.IndexCalConstant;
import com.epmet.dao.evaluationindex.indexcal.CommunityScoreDao;
import com.epmet.dao.evaluationindex.indexcal.GridScoreDao;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao;
import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao;
import com.epmet.dao.evaluationindex.screen.FactIndexGridScoreDao;
import com.epmet.dto.screen.FactIndexCommunityScoreDTO; import com.epmet.dto.screen.FactIndexCommunityScoreDTO;
import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO;
import com.epmet.dto.screen.result.SubGridAvgResultDTO; import com.epmet.dto.screen.result.SubGridAvgResultDTO;
@ -26,6 +26,7 @@ import com.epmet.support.normalizing.Correlation;
import com.epmet.support.normalizing.ScoreCalculator; import com.epmet.support.normalizing.ScoreCalculator;
import com.epmet.support.normalizing.ScoreConstants; import com.epmet.support.normalizing.ScoreConstants;
import com.epmet.support.normalizing.batch.BatchScoreCalculator; import com.epmet.support.normalizing.batch.BatchScoreCalculator;
import com.epmet.support.normalizing.batch.CalculateResult;
import com.epmet.support.normalizing.batch.IndexInputVO; import com.epmet.support.normalizing.batch.IndexInputVO;
import com.epmet.support.normalizing.batch.SampleValue; import com.epmet.support.normalizing.batch.SampleValue;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -59,9 +60,9 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
@Autowired @Autowired
private IndexCodeFieldReService indexCodeFieldReService; private IndexCodeFieldReService indexCodeFieldReService;
@Autowired @Autowired
private FactIndexCommunityScoreDao factIndexCommunityScoreDao; private CommunityScoreDao factIndexCommunityScoreDao;
@Autowired @Autowired
private FactIndexGridScoreDao factIndexGridScoreDao; private GridScoreDao factIndexGridScoreDao;
/** /**
* @param customerId * @param customerId
@ -78,7 +79,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
return false; return false;
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String,String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
//下属所有网格的党建能力平均值 //下属所有网格的党建能力平均值
detailListByParentCode.forEach(detail -> { detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) {
@ -86,23 +87,19 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { if (CollectionUtils.isEmpty(subGridPartyAvgScore)) {
log.error(IndexCalConstant.GRID_PARTY_AVG_NULL); log.error(IndexCalConstant.GRID_PARTY_AVG_NULL);
return; return;
}else if (subGridPartyAvgScore.size() == NumConstant.ONE){ } else {
pid.put(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),subGridPartyAvgScore.get(NumConstant.ZERO).getParentId());
sizeOne(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),pid);
return;
}else if (subGridPartyAvgScore.size() > NumConstant.ONE) {
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList()));
Integer indexEnd = NumConstant.TEN; Integer indexEnd = NumConstant.TEN;
List<List<SubGridAvgResultDTO>> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, indexEnd); List<List<SubGridAvgResultDTO>> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, indexEnd);
subPartyAvgList.forEach( party -> { subPartyAvgList.forEach(party -> {
List<SampleValue> index1SampleValues = new ArrayList<>(); List<SampleValue> index1SampleValues = new ArrayList<>();
party.forEach(c -> { party.forEach(c -> {
pid.put(c.getAgencyId(),c.getParentId()); pid.put(c.getAgencyId(), c.getParentId());
SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); SampleValue s = new SampleValue(c.getAgencyId(), c.getScore());
index1SampleValues.add(s); index1SampleValues.add(s);
}); });
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc);
indexInputVOS.add(index1VO); indexInputVOS.add(index1VO);
}); });
} }
@ -115,25 +112,21 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
} }
String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode());
if (StringUtils.isEmpty(fieldNameByIndexCode)) { if (StringUtils.isEmpty(fieldNameByIndexCode)) {
log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode())); log.error(String.format(IndexCalConstant.INDEX_CODE_NULL, detail.getIndexCode()));
return;
}else if (publishArticleCountList.size() == NumConstant.ONE){
pid.put(publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString());
sizeOne(publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),pid);
return; return;
}else if (publishArticleCountList.size() > NumConstant.ONE) { } else {
List<BigDecimal> decimalList = publishArticleCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); List<BigDecimal> decimalList = publishArticleCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList());
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList);
List<List<Map<String, Object>>> publishArticleList = ListUtils.partition(publishArticleCountList, IndexCalConstant.PAGE_SIZE); List<List<Map<String, Object>>> publishArticleList = ListUtils.partition(publishArticleCountList, IndexCalConstant.PAGE_SIZE);
publishArticleList.forEach( publish -> { publishArticleList.forEach(publish -> {
ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
List<SampleValue> index1SampleValues = new ArrayList<>(); List<SampleValue> index1SampleValues = new ArrayList<>();
publish.forEach(c -> { publish.forEach(c -> {
pid.put(c.get(IndexCalConstant.AGENCY_ID).toString(),c.get(IndexCalConstant.PARENT_ID).toString()); pid.put(c.get(IndexCalConstant.AGENCY_ID).toString(), c.get(IndexCalConstant.PARENT_ID).toString());
SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode))));
index1SampleValues.add(s); index1SampleValues.add(s);
}); });
IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1);
indexInputVOS.add(index1VO); indexInputVOS.add(index1VO);
}); });
} }
@ -141,10 +134,11 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
}); });
BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator();
log.info("communityPartyCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("communityPartyCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS));
HashMap<String, BigDecimal> scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); HashMap<String, CalculateResult> scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS);
log.info("communityPartyCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreCountOfSampleId)); log.info("communityPartyCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
List<FactIndexCommunityScoreDTO> result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),pid); List<FactIndexCommunityScoreDTO> result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid);
deleteAndInsert(customerId, monthId, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), result); factIndexCommunityScoreDao.deleteOldRecord(customerId, monthId);
deleteAndInsert(result);
return true; return true;
} }
@ -162,30 +156,25 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
return false; return false;
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String,String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
detailListByParentCode.forEach(detail -> { detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) {
List<SubGridAvgResultDTO> subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); List<SubGridAvgResultDTO> subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
if (CollectionUtils.isEmpty(subGridGovernAvg)){ if (CollectionUtils.isEmpty(subGridGovernAvg)){
log.error("社区下级治理能力平均分集合为空"); log.error("社区下级治理能力平均分集合为空");
return; return;
} }else{
if (subGridGovernAvg.size() == NumConstant.ONE) {
pid.put(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),subGridGovernAvg.get(NumConstant.ZERO).getParentId());
sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),pid);
return;
} else if (subGridGovernAvg.size() > NumConstant.ONE) {
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList()));
List<List<SubGridAvgResultDTO>> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE); List<List<SubGridAvgResultDTO>> governAvg = ListUtils.partition(subGridGovernAvg, IndexCalConstant.PAGE_SIZE);
governAvg.forEach(avg -> { governAvg.forEach(avg -> {
List<SampleValue> index1SampleValues = new ArrayList<>(); List<SampleValue> index1SampleValues = new ArrayList<>();
avg.forEach(c -> { avg.forEach(c -> {
pid.put(c.getAgencyId(),c.getParentId()); pid.put(c.getAgencyId(), c.getParentId());
SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); SampleValue s = new SampleValue(c.getAgencyId(), c.getScore());
index1SampleValues.add(s); index1SampleValues.add(s);
}); });
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc);
indexInputVOS.add(index1VO); indexInputVOS.add(index1VO);
}); });
} }
@ -195,11 +184,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
if (CollectionUtils.isEmpty(communityGovernAbility)){ if (CollectionUtils.isEmpty(communityGovernAbility)){
log.error(IndexCalConstant.COMMUNITY_GOVERN_ABILITY_NULL); log.error(IndexCalConstant.COMMUNITY_GOVERN_ABILITY_NULL);
return; return;
}else if (communityGovernAbility.size() == NumConstant.ONE) { }else{
pid.put(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString());
sizeOne(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),pid);
return;
} else if (communityGovernAbility.size() > NumConstant.ONE) {
String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode());
if (StringUtils.isEmpty(fieldNameByIndexCode)) { if (StringUtils.isEmpty(fieldNameByIndexCode)) {
log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode())); log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode()));
@ -212,11 +197,11 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
ScoreCalculator<Integer> sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); ScoreCalculator<Integer> sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
List<SampleValue> index1SampleValues = new ArrayList<>(); List<SampleValue> index1SampleValues = new ArrayList<>();
governAbility.forEach(c -> { governAbility.forEach(c -> {
pid.put(c.get(IndexCalConstant.AGENCY_ID).toString(),c.get(IndexCalConstant.PARENT_ID).toString()); pid.put(c.get(IndexCalConstant.AGENCY_ID).toString(), c.get(IndexCalConstant.PARENT_ID).toString());
SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode))));
index1SampleValues.add(s); index1SampleValues.add(s);
}); });
IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1);
indexInputVOS.add(index1VO); indexInputVOS.add(index1VO);
}); });
} }
@ -224,10 +209,10 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
}); });
BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator();
log.info("communityGovernAbilityCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("communityGovernAbilityCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS));
HashMap<String, BigDecimal> scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); HashMap<String, CalculateResult> scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS);
log.info("communityGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreCountOfSampleId)); log.info("communityGovernAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
List<FactIndexCommunityScoreDTO> result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),pid); List<FactIndexCommunityScoreDTO> result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid);
deleteAndInsert(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), result); deleteAndInsert(result);
return true; return true;
} }
@ -245,27 +230,26 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
return false; return false;
} }
List<IndexInputVO> indexInputVOS = new ArrayList<>(); List<IndexInputVO> indexInputVOS = new ArrayList<>();
Map<String,String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
detailListByParentCode.forEach(detail -> { detailListByParentCode.forEach(detail -> {
String indexCode = detail.getIndexCode(); String indexCode = detail.getIndexCode();
if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) {
List<SubGridAvgResultDTO> subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); List<SubGridAvgResultDTO> subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode());
if (subGridServiceAvg.size() == NumConstant.ONE) { if (CollectionUtils.isEmpty(subGridServiceAvg)) {
pid.put(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId(),subGridServiceAvg.get(NumConstant.ZERO).getParentId()); log.error("查询社区下级所有网格服务能力得分平均值集合为空");
sizeOne(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),pid);
return; return;
} else if (subGridServiceAvg.size() > NumConstant.ONE) { } else {
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList()));
List<List<SubGridAvgResultDTO>> serviceAvgList = ListUtils.partition(subGridServiceAvg, IndexCalConstant.PAGE_SIZE); List<List<SubGridAvgResultDTO>> serviceAvgList = ListUtils.partition(subGridServiceAvg, IndexCalConstant.PAGE_SIZE);
serviceAvgList.forEach(serviceAvg -> { serviceAvgList.forEach(serviceAvg -> {
BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
List<SampleValue> index1SampleValues = new ArrayList<>(); List<SampleValue> index1SampleValues = new ArrayList<>();
serviceAvg.forEach(c -> { serviceAvg.forEach(c -> {
pid.put(c.getAgencyId(),c.getParentId()); pid.put(c.getAgencyId(), c.getParentId());
SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); SampleValue s = new SampleValue(c.getAgencyId(), c.getScore());
index1SampleValues.add(s); index1SampleValues.add(s);
}); });
IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1);
indexInputVOS.add(index1VO); indexInputVOS.add(index1VO);
}); });
} }
@ -274,11 +258,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
if (CollectionUtils.isEmpty(communityActivityCountList)) { if (CollectionUtils.isEmpty(communityActivityCountList)) {
log.error(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL); log.error(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL);
return; return;
}else if (communityActivityCountList.size() == NumConstant.ONE) { }else{
pid.put(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString());
sizeOne(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),pid);
return;
} else if (communityActivityCountList.size() > NumConstant.ONE) {
String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode());
if (StringUtils.isEmpty(fieldNameByIndexCode)) { if (StringUtils.isEmpty(fieldNameByIndexCode)) {
log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode())); log.error(String.format(IndexCalConstant.INDEX_CODE_NULL,detail.getIndexCode()));
@ -291,11 +271,11 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
ScoreCalculator<Integer> sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); ScoreCalculator<Integer> sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
List<SampleValue> index1SampleValues = new ArrayList<>(); List<SampleValue> index1SampleValues = new ArrayList<>();
communityActivity.forEach(c -> { communityActivity.forEach(c -> {
pid.put(c.get(IndexCalConstant.AGENCY_ID).toString(),c.get(IndexCalConstant.PARENT_ID).toString()); pid.put(c.get(IndexCalConstant.AGENCY_ID).toString(), c.get(IndexCalConstant.PARENT_ID).toString());
SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode))));
index1SampleValues.add(s); index1SampleValues.add(s);
}); });
IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1);
indexInputVOS.add(index1VO); indexInputVOS.add(index1VO);
}); });
} }
@ -303,10 +283,10 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
}); });
BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator();
log.info("communityServiceAbilityCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS)); log.info("communityServiceAbilityCalculate getScoreCountOfSampleId param:{}", JSON.toJSONString(indexInputVOS));
HashMap<String, BigDecimal> scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); HashMap<String, CalculateResult> scoreTotalOfSampleId = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS);
log.info("communityServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreCountOfSampleId)); log.info("communityServiceAbilityCalculate getScoreCountOfSampleId result:{}", JSON.toJSONString(scoreTotalOfSampleId));
List<FactIndexCommunityScoreDTO> result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(),pid); List<FactIndexCommunityScoreDTO> result = getResultB(scoreTotalOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode(), IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), pid);
deleteAndInsert(customerId, monthId, IndexCodeEnum.FU_WU_NENG_LI.getCode(), result); deleteAndInsert(result);
return true; return true;
} }
@ -338,13 +318,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
score.setYearId(DateUtils.getYearId(monthId)); score.setYearId(DateUtils.getYearId(monthId));
score.setQuarterId(DateUtils.getQuarterId(monthId)); score.setQuarterId(DateUtils.getQuarterId(monthId));
score.setIndexCode(IndexCalConstant.COMMUNITY_RELATE); score.setIndexCode(IndexCalConstant.COMMUNITY_RELATE);
score.setAllParentIndexCode(NumConstant.ZERO_STR);
value.forEach(community -> { value.forEach(community -> {
score.setScore(score.getScore().add(community.getScore())); score.setScore(score.getScore().add(community.getScore()));
score.setParentAgencyId(community.getParentAgencyId()); score.setParentAgencyId(community.getParentAgencyId());
}); });
result.add(score); result.add(score);
}); });
deleteAndInsert(customerId, monthId, IndexCalConstant.COMMUNITY_RELATE, result); deleteAndInsert(result);
return true; return true;
} }
@ -391,33 +372,29 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
} }
/** /**
* @param customerId
* @param monthId
* @param indexCode
* @param subAllGridList * @param subAllGridList
* @Description 先删除记录在插入 * @Description 先删除记录在插入
* @author zxc * @author zxc
* @date 2020/9/1 4:24 下午 * @date 2020/9/1 4:24 下午
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void deleteAndInsert(String customerId, String monthId, String indexCode, List<FactIndexCommunityScoreDTO> subAllGridList) { public void deleteAndInsert(List<FactIndexCommunityScoreDTO> subAllGridList) {
if (!CollectionUtils.isEmpty(subAllGridList)) { if (!CollectionUtils.isEmpty(subAllGridList)) {
factIndexCommunityScoreDao.deleteOldRecord(customerId, monthId, indexCode);
factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList); factIndexCommunityScoreDao.insertCommunityPartyRecord(subAllGridList);
} }
} }
/** /**
* @param scoreCountOfSampleId 指标计算结果
* @param customerId 客户ID
* @param monthId 月份ID
* @param isTotal 是否 总分党建+治理+服务
* @param indexCode 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunenglixx相关xx相关
* @Description * @Description
* @param scoreCountOfSampleId 指标计算结果
* @param customerId 客户ID
* @param monthId 月份ID
* @param isTotal 是否 总分党建+治理+服务
* @param indexCode 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunenglixx相关xx相关
* @author zxc * @author zxc
* @date 2020/9/2 2:37 下午 * @date 2020/9/2 2:37 下午
*/ */
public List<FactIndexCommunityScoreDTO> getResult(HashMap<String, BigDecimal> scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode,Map<String,String> pid) { public List<FactIndexCommunityScoreDTO> getResultB(HashMap<String, CalculateResult> scoreCountOfSampleId, String customerId, String monthId, String isTotal, String indexCode,String allParentIndexCode, Map<String, String> pid) {
List<FactIndexCommunityScoreDTO> result = new ArrayList<>(); List<FactIndexCommunityScoreDTO> result = new ArrayList<>();
scoreCountOfSampleId.forEach((k, v) -> { scoreCountOfSampleId.forEach((k, v) -> {
FactIndexCommunityScoreDTO score = new FactIndexCommunityScoreDTO(); FactIndexCommunityScoreDTO score = new FactIndexCommunityScoreDTO();
@ -428,29 +405,35 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
score.setYearId(DateUtils.getYearId(monthId)); score.setYearId(DateUtils.getYearId(monthId));
score.setIsTotal(isTotal); score.setIsTotal(isTotal);
score.setIndexCode(indexCode); score.setIndexCode(indexCode);
score.setScore(v); score.setScore(v.getTotalScore());
pid.forEach((agency,parentAgency) -> { score.setAllParentIndexCode(allParentIndexCode);
if (k.equals(agency)){ pid.forEach((agency, parentAgency) -> {
if (k.equals(agency)) {
score.setParentAgencyId(parentAgency); score.setParentAgencyId(parentAgency);
} }
}); });
if (!CollectionUtils.isEmpty(v.getDetails())) {
v.getDetails().forEach(fiveDetail -> {
FactIndexCommunityScoreDTO s = new FactIndexCommunityScoreDTO();
s.setCustomerId(customerId);
s.setAgencyId(k);
s.setMonthId(monthId);
s.setQuarterId(DateUtils.getQuarterId(monthId));
s.setYearId(DateUtils.getYearId(monthId));
s.setIsTotal(isTotal);
s.setIndexCode(fiveDetail.getIndexCode());
s.setScore(fiveDetail.getScore());
s.setAllParentIndexCode(fiveDetail.getAllParentIndexCode());
pid.forEach((agency, parentAgency) -> {
if (k.equals(agency)) {
s.setParentAgencyId(parentAgency);
}
});
result.add(s);
});
}
result.add(score); result.add(score);
}); });
return result; return result;
} }
/**
* @Description 当查询结果为一条时调用此方法
* @param agencyId
* @param customerId
* @param monthId
* @author zxc
* @date 2020/9/2 2:40 下午
*/
public void sizeOne(String agencyId,String customerId,String monthId,String indexCode,Map<String,String> pid){
HashMap<String, BigDecimal> scoreCountOfSampleId = new HashMap<>();
scoreCountOfSampleId.put(agencyId,new BigDecimal(NumConstant.FIFTY));
List<FactIndexCommunityScoreDTO> result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, indexCode,pid);
deleteAndInsert(customerId, monthId, indexCode, result);
}
} }

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

Loading…
Cancel
Save