Browse Source

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

dev
wangchao 5 years ago
parent
commit
51f7ebeb6a
  1. 2
      epmet-admin/epmet-admin-server/Dockerfile
  2. 2
      epmet-admin/epmet-admin-server/deploy/docker-compose-dev.yml
  3. 2
      epmet-admin/epmet-admin-server/deploy/docker-compose-prod.yml
  4. 2
      epmet-admin/epmet-admin-server/deploy/docker-compose-test.yml
  5. 2
      epmet-auth/Dockerfile
  6. 2
      epmet-auth/deploy/docker-compose-dev.yml
  7. 2
      epmet-auth/deploy/docker-compose-prod.yml
  8. 2
      epmet-auth/deploy/docker-compose-test.yml
  9. 17
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
  10. 2
      epmet-gateway/Dockerfile
  11. 2
      epmet-gateway/deploy/docker-compose-dev.yml
  12. 2
      epmet-gateway/deploy/docker-compose-prod.yml
  13. 2
      epmet-gateway/deploy/docker-compose-test.yml
  14. 2
      epmet-module/data-report/data-report-server/Dockerfile
  15. 2
      epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml
  16. 2
      epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml
  17. 2
      epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml
  18. 30
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
  19. 16
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml
  20. 9
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java
  21. 6
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java
  22. 6
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java
  23. 2
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java
  24. 13
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexCommunityScoreDTO.java
  25. 4
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java
  26. 19
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java
  27. 4
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java
  28. 10
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerHeartRankFormDTO.java
  29. 2
      epmet-module/data-statistical/data-statistical-server/Dockerfile
  30. 2
      epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml
  31. 4
      epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml
  32. 2
      epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml
  33. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
  34. 45
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java
  35. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java
  36. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java
  37. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunitySubScoreDao.java
  38. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java
  39. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java
  40. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java
  41. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java
  42. 30
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java
  43. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java
  44. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencySubScoreEntity.java
  45. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java
  46. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcSubScoreEntity.java
  47. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java
  48. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptSubScoreEntity.java
  49. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/FactIndexCommunityScoreEntity.java
  50. 70
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/FactIndexCommunitySubScoreEntity.java
  51. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java
  52. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridSubScoreEntity.java
  53. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java
  54. 75
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java
  55. 17
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java
  56. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectCategoryGridDailyEntity.java
  57. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyEntity.java
  58. 31
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCalRedis.java
  59. 105
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java
  60. 40
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java
  61. 35
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java
  62. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java
  63. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java
  64. 171
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java
  65. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java
  66. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCodeFieldReServiceImpl.java
  67. 92
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java
  68. 13
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/IndexGroupDetailService.java
  69. 38
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailServiceImpl.java
  70. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java
  71. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexScoreVo.java
  72. 687
      epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__add_index_table.sql
  73. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml
  74. 53
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml
  75. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml
  76. 49
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml
  77. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml
  78. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml
  79. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcSubScoreDao.xml
  80. 5
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml
  81. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml
  82. 7
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml
  83. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml
  84. 4
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml
  85. 6
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml
  86. 32
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml
  87. 32
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml
  88. 6
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.xml
  89. 2
      epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java
  90. 2
      epmet-module/epmet-activiti/epmet-activiti-server/Dockerfile
  91. 2
      epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-dev.yml
  92. 2
      epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-prod.yml
  93. 2
      epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-test.yml
  94. 2
      epmet-module/epmet-common-service/common-service-server/Dockerfile
  95. 2
      epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-dev.yml
  96. 2
      epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml
  97. 2
      epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-test.yml
  98. 2
      epmet-module/epmet-ext/epmet-ext-server/Dockerfile
  99. 2
      epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml
  100. 2
      epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml

2
epmet-admin/epmet-admin-server/Dockerfile

@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8"
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
COPY ./target/*.jar ./app.jar
COPY ./target/*.jar ./epmet-admin.jar
EXPOSE 8082

2
epmet-admin/epmet-admin-server/deploy/docker-compose-dev.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/dev:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-admin.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-admin/epmet-admin-server/deploy/docker-compose-prod.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/prod:/logs"
environment:
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-admin.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-admin/epmet-admin-server/deploy/docker-compose-test.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/test:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-admin.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-auth/Dockerfile

@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8"
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
COPY ./target/*.jar ./app.jar
COPY ./target/*.jar ./epmet-auth.jar
EXPOSE 8081

2
epmet-auth/deploy/docker-compose-dev.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/dev:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-auth.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-auth/deploy/docker-compose-prod.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/prod:/logs"
environment:
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-auth.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-auth/deploy/docker-compose-test.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/test:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./epmet-auth.jar"
restart: "unless-stopped"
deploy:
resources:

17
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java

@ -295,25 +295,36 @@ public class RedisKeys {
* @return
*/
public static String getExternalAppSecretKey(String appId) {
return String.format(rootPrefix+"externalapp:secret:%s",appId);
return String.format(rootPrefix + "externalapp:secret:%s", appId);
}
/**
* 计算指标时获取指标code和fields关系缓存Key
*
* @return
*/
public static String getIndexCodeFieldReKey() {
return rootPrefix.concat("data:index:indexcode:field");
return rootPrefix.concat("stats:indexcal:indexcode:field");
}
/**
* 计算指标时获取指标权重缓存Key
*
* @return
*/
public static String getIndexCodeWeightKey(String customerId) {
return rootPrefix.concat("stats:indexcal:indexcode:weight").concat(customerId);
}
/**
* 客户统计的计算标记
* 0:未在计算
* 1:正在计算
*
* @param customerId
* @return
*/
public static String getCustomerStatsCalFlag(String customerId) {
return String.format(rootPrefix+"stats:calflag:%s", customerId);
return String.format(rootPrefix + "stats:calflag:%s", customerId);
}
}

2
epmet-gateway/Dockerfile

@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8"
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
COPY ./target/*.jar ./app.jar
COPY ./target/*.jar ./epmet-gateway.jar
EXPOSE 8080

2
epmet-gateway/deploy/docker-compose-dev.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/dev:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-gateway.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-gateway/deploy/docker-compose-prod.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/prod:/logs"
environment:
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-gateway.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-gateway/deploy/docker-compose-test.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/test:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-gateway.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-module/data-report/data-report-server/Dockerfile

@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8"
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
COPY ./target/*.jar ./app.jar
COPY ./target/*.jar ./data-report.jar
EXPOSE 8109

2
epmet-module/data-report/data-report-server/deploy/docker-compose-dev.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/dev:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./data-report.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/prod:/logs"
environment:
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./data-report.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-module/data-report/data-report-server/deploy/docker-compose-test.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/test:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx250m -jar ./data-report.jar"
restart: "unless-stopped"
deploy:
resources:

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

@ -6,9 +6,9 @@
<!-- 2、月度指数分析-饼状图 -->
<select id="selectMonthPieChart" resultType="com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO">
SELECT
service_ablity AS serviceAbility,
party_dev_ablity AS partyDevAbility,
govern_ablity AS governAbility
ROUND(service_ablity,1) AS serviceAbility,
ROUND(party_dev_ablity,1) AS partyDevAbility,
ROUND(govern_ablity,1) AS governAbility
FROM
screen_index_data_monthly
WHERE
@ -30,10 +30,10 @@
<select id="selectMonthBarchart" resultType="com.epmet.evaluationindex.screen.dto.result.MonthBarchartResult">
SELECT
month_id AS monthId,
service_ablity AS serviceAbility,
party_dev_ablity AS partyDevAbility,
govern_ablity AS governAbility,
index_total AS indexTotal
ROUND(service_ablity,1) AS serviceAbility,
ROUND(party_dev_ablity,1) AS partyDevAbility,
ROUND(govern_ablity,1) AS governAbility,
ROUND(index_total,1) AS indexTotal
FROM
screen_index_data_monthly
WHERE
@ -47,10 +47,10 @@
<select id="selectSubAgencyIndexRank" parameterType="com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO" resultType="com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO">
SELECT
org_name AS NAME,
index_total AS totalIndex,
govern_ablity AS governAbility,
party_dev_ablity AS partyDevAbility,
service_ablity AS serviceAbility
ROUND(index_total,1) AS totalIndex,
ROUND(govern_ablity,1) AS governAbility,
ROUND(party_dev_ablity,1) AS partyDevAbility,
ROUND(service_ablity,1) AS serviceAbility
FROM
screen_index_data_yearly
WHERE
@ -66,10 +66,10 @@
resultType="com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankResultDTO">
SELECT
org_name AS `NAME`,
index_total AS totalIndex,
govern_ablity AS governAbility,
party_dev_ablity AS partyDevAbility,
service_ablity AS serviceAbility,
ROUND(index_total, 1) AS totalIndex,
ROUND(govern_ablity, 1) AS governAbility,
ROUND(party_dev_ablity, 1) AS partyDevAbility,
ROUND(service_ablity, 1) AS serviceAbility,
ORG_ID orgId
FROM
screen_index_data_monthly

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

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

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

@ -120,12 +120,17 @@ public class AgencyScoreDTO implements Serializable {
/**
* 更新人
*/
private String updatedBy;
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
private Date updatedTime;
/**
* 权重
*/
private BigDecimal weight;
public AgencyScoreDTO() {
this.isTotal = NumConstant.ZERO_STR;

6
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java

@ -1,7 +1,9 @@
package com.epmet.dto.indexcal;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
@ -13,6 +15,9 @@ import java.io.Serializable;
@Data
public class CalculateCommonFormDTO implements Serializable {
private static final long serialVersionUID = -5689788391963427717L;
public interface CancelCalculateGroup extends CustomerClientShowGroup {}
/**
* 月份id: yyyyMM
*/
@ -21,6 +26,7 @@ public class CalculateCommonFormDTO implements Serializable {
/**
* 客户id
*/
@NotBlank(message = "客户id不能为空", groups = { CancelCalculateGroup.class })
private String customerId;
public CalculateCommonFormDTO() {

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

@ -120,4 +120,8 @@ public class DeptScoreDTO implements Serializable {
*/
private Date updatedTime;
}
/**
* 权重同一组权重总和=1 9.12新增
*/
private BigDecimal weight;
}

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

@ -71,7 +71,7 @@ public class OrgGovrnAbilityFormDTO implements Serializable {
private BigDecimal satisfactionRatio;
/**
* 社区超期项目率dataTyp=commnuity有值
* 社区超期项目率dataTyp=community有值
*/
private BigDecimal overdueProjectRatio;

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

@ -17,11 +17,11 @@
package com.epmet.dto.screen;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 社区相关分数表
@ -112,12 +112,17 @@ public class FactIndexCommunityScoreDTO implements Serializable {
/**
* 更新人
*/
private String updatedBy;
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
private Date updatedTime;
/**
* 权重
*/
private BigDecimal weight;
public FactIndexCommunityScoreDTO() {
this.customerId = "";

4
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java

@ -119,4 +119,8 @@ public class FactIndexGridScoreDTO implements Serializable {
*/
private Date updatedTime;
/**
* 权重同一组权重总和=1 9.12新增
*/
private BigDecimal weight;
}

19
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/IndexDataMonthlyFormDTO.java

@ -1,5 +1,6 @@
package com.epmet.dto.screencoll.form;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
@ -64,4 +65,22 @@ public class IndexDataMonthlyFormDTO implements Serializable {
* 治理能力指数
*/
private BigDecimal governAblity;
// PARTY_DEV_WEIGHT decimal 5 4 0 0 0 0 0 0 0 0 0 0 0
// SERVICE_ABLITY_WEIGHT decimal 5 4 0 0 0 0 0 0 0 0 0 0 0
// GOVERN_ABLITY_WEIGHT decimal 5 4 0 0 0 0 0 0 0 0 0 0 0
/**
* 党建能力指数权重
*/
private BigDecimal partyDevWeight = new BigDecimal(NumConstant.ZERO);
/**
* 服务能力指数 权重
*/
private BigDecimal serviceAblityWeight = new BigDecimal(NumConstant.ZERO);
/**
* 治理能力分数权重
*/
private BigDecimal governAblityWeight = new BigDecimal(NumConstant.ZERO);
}

4
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcCategorySummaryFormDTO.java

@ -36,12 +36,12 @@ public class KcCategorySummaryFormDTO implements Serializable {
private String allParentIds;
/**
* 类别id
* 一级类别id
*/
private String categoryId;
/**
* 分类名称
* 一级分类名称
*/
private String categoryName;

10
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screencoll/form/KcVolunteerHeartRankFormDTO.java

@ -49,4 +49,14 @@ public class KcVolunteerHeartRankFormDTO implements Serializable {
* 爱心时长 单位分钟
*/
private Integer heartTime;
/**
* 积分09-11新增
*/
private Integer points;
/**
* 志愿者id 09-11新增
*/
private String volunteerId;
}

2
epmet-module/data-statistical/data-statistical-server/Dockerfile

@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8"
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
COPY ./target/*.jar ./app.jar
COPY ./target/*.jar ./data-stats.jar
EXPOSE 8108

2
epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-dev.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/dev:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx512m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx512m -jar ./data-stats.jar"
restart: "unless-stopped"
deploy:
resources:

4
epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-prod.yml

@ -9,10 +9,10 @@ services:
volumes:
- "/opt/epmet-cloud-logs/prod:/logs"
environment:
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms256m -Xmx1024m -jar ./data-stats.jar"
restart: "unless-stopped"
deploy:
resources:
limits:
cpus: '0.1'
memory: 600M
memory: 1100M

2
epmet-module/data-statistical/data-statistical-server/deploy/docker-compose-test.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/test:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx512m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx512m -jar ./data-stats.jar"
restart: "unless-stopped"
deploy:
resources:

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

@ -168,9 +168,9 @@ public class DemoController {
// List<GridScoreDTO> gridScoreDTOList=gridScoreDao.selectList(formDTO);
// return new Result<List<GridScoreDTO>>().ok(gridScoreDTOList);
cpcIndexCalculateService.cpcIndexCalculate(formDTO);
// cpcIndexCalculateService.cpcIndexCalculate(formDTO);
gridCorreLationService.calculateGridCorreLation(formDTO);
deptScoreService.calculateDeptCorreLation(formDTO);
// deptScoreService.calculateDeptCorreLation(formDTO);
return new Result();
}
@DataSource(DataSourceConstant.EVALUATION_INDEX)

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

@ -7,6 +7,7 @@ import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService;
import com.epmet.service.evaluationindex.indexcal.IndexCalculateService;
@ -20,7 +21,10 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.PreDestroy;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.*;
/**
@ -52,6 +56,17 @@ public class IndexCalculateController {
// 计算同步锁
private Object statsCalLock = new Object();
private Map<String, Future> futureMap = new HashMap<>();
@PreDestroy
public void clearDataCalFlag() {
// 实例销毁之前,将正在本实例中执行计算的客户列表的计算状态清空
futureMap.forEach((customerId, future) -> {
redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(customerId));
});
}
/**
* 按照客户计算所有指标(按照月份)
*
@ -64,6 +79,7 @@ public class IndexCalculateController {
@PostMapping("all")
public Result<Boolean> indexCalculate(ExternalAppRequestParam externalAppRequestParam, @RequestBody CalculateCommonFormDTO formDTO) {
String customerId = externalAppRequestParam.getCustomerId();
//String customerId = "epmettest";
Boolean executing = (Boolean) redisUtils.get(RedisKeys.getCustomerStatsCalFlag(customerId));
if (executing == null || !executing) {
synchronized (statsCalLock) {
@ -72,15 +88,17 @@ public class IndexCalculateController {
log.error(String.format("该客户正在执行计算,请勿重复提交计算请求。", customerId));
return new Result<Boolean>().ok(false);
}
singleThreadPool.execute(() -> {
Future<?> future = singleThreadPool.submit(() -> {
formDTO.setCustomerId(customerId);
long start = System.currentTimeMillis();
Boolean aBoolean = indexCalculateService.indexCalculate(formDTO);
if (aBoolean) {
log.error("客户Id:{},全部指标计算完成,总耗时:{}秒", customerId, (System.currentTimeMillis() - start) / 1000);
}
redisUtils.set(RedisKeys.getCustomerStatsCalFlag(customerId), false);
redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(customerId));
futureMap.remove(customerId);
});
futureMap.put(customerId, future);
redisUtils.set(RedisKeys.getCustomerStatsCalFlag(customerId), true);
}
} else {
@ -92,14 +110,35 @@ public class IndexCalculateController {
return new Result<Boolean>().ok(true);
}
/**
* 终止计算
* @param form
* @return
*/
@ExternalAppRequestAuth
@PostMapping("stopcalculate")
public Result stopcalculate(@RequestBody CalculateCommonFormDTO form) {
ValidatorUtils.validateEntity(form);
String customerId = form.getCustomerId();
Future future = this.futureMap.get(customerId);
if (future != null && !future.isCancelled()) {
future.cancel(true);
redisUtils.delete(RedisKeys.getCustomerStatsCalFlag(customerId));
futureMap.remove(customerId);
HttpClientManager.getInstance().sendAlarmMsg(String.format("数据统计服务-中止计算成功,customerId:%s", customerId));
}
return new Result();
}
@PostMapping("reAll")
public Result<Boolean> calculateAll(@RequestBody CalculateCommonFormDTO formDTO) {
long start = System.currentTimeMillis();
Boolean aBoolean = indexCalculateService.indexCalculate(formDTO);
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + formDTO.getCustomerId() + ",calculateAll全部指标计算完成,是否成功:" + aBoolean + ",总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒");
if (aBoolean) {
return new Result<Boolean>().ok(true);
}
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + formDTO.getCustomerId() + ",calculateAll全部指标计算完成,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒");
return new Result<Boolean>().error("指标计算失败");
}

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

@ -82,17 +82,6 @@ public interface AgencyScoreDao extends BaseDao<AgencyScoreEntity> {
**/
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

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java

@ -20,7 +20,7 @@ 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 com.epmet.entity.evaluationindex.indexcal.FactIndexCommunityScoreEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -79,17 +79,6 @@ public interface CommunityScoreDao extends BaseDao<FactIndexCommunityScoreEntity
*/
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

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

@ -18,9 +18,8 @@
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 com.epmet.entity.evaluationindex.indexcal.FactIndexCommunitySubScoreEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -33,7 +32,7 @@ import java.util.List;
* @since v1.0.0 2020-08-31
*/
@Mapper
public interface CommunitySubScoreDao extends BaseDao<FactIndexCommunityScoreEntity> {
public interface CommunitySubScoreDao extends BaseDao<FactIndexCommunitySubScoreEntity> {
/**
* @param lists

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, @Param("deleteSize") Integer deleteSize, @Param("isTotal") String isTotal);
List<CpcScoreEntity> getPartScore(@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, @Param("offset") int offset, @Param("pageSize") int pageSize);
int insertBatch(@Param("list") Collection<CpcScoreEntity> values);
}

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java

@ -19,7 +19,6 @@ package com.epmet.dao.evaluationindex.indexcoll;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcollect.form.GridPartyMemberDataDetailFormDTO;
import com.epmet.dto.indexcollect.form.GridPartyMemberDataFormDTO;
import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -46,7 +45,7 @@ public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao<FactIndexPart
* @Date 10:52 2020-08-20
**/
int deleteFactIndexPartyAblityCpcMonthly(@Param("customerId") String customerId,
@Param("monthId") String monthId);
@Param("monthId") String monthId);
/**
* 1党建能力-党员相关指标上报(按照月份)
@ -58,9 +57,9 @@ public interface FactIndexPartyAblityCpcMonthlyDao extends BaseDao<FactIndexPart
* @Date 10:52 2020-08-20
**/
int batchInsertFactIndexPartyAblityCpcMonthly(@Param("list") List<GridPartyMemberDataDetailFormDTO> list,
@Param("customerId") String customerId);
@Param("customerId") String customerId);
List<Map<String, Object>> getCountByMonthId(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("offset") Integer offset, @Param("pageSize") Integer pageSize);
Map<String, Object> getExtremeValue(@Param("customerId") String customerId);
Map<String, Object> getExtremeValue(@Param("customerId") String customerId, @Param("monthId") String monthId);
}

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

@ -34,4 +34,6 @@ import java.util.List;
public interface IndexGroupDetailDao extends BaseDao<IndexGroupDetailEntity> {
List<IndexGroupDetailEntity> getDetailListByParentCode(@Param("customerId") String customerId, @Param("indexCode") String indexCode);
List<IndexGroupDetailEntity> getAllIndexWeightList(String customerId);
}

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

@ -56,14 +56,14 @@ public interface ScreenCustomerAgencyDao extends BaseDao<ScreenCustomerAgencyEnt
void batchInsertCustomerAgency(@Param("list") List<CustomerAgencyFormDTO> list, @Param("customerId")String customerId);
/**
* 返回当前客户下未匹配到的组织信息
* 返回当前客户下未匹配到的 社区级 组织信息
* @param customerId 客户id
* @param agencyIds 组织id集合
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity>
* @Author zhangyong
* @Date 14:38 2020-09-04
**/
List<ScreenCustomerAgencyEntity> selectListMismatcAgencyInfo(@Param("customerId")String customerId, @Param("agencyIds") String[] agencyIds);
List<ScreenCustomerAgencyEntity> selectListMismatcCommunityAgencyInfo(@Param("customerId")String customerId, @Param("agencyIds") String[] agencyIds);
/**
* 根据客户id查询区/街道 组织名称id
@ -82,4 +82,15 @@ public interface ScreenCustomerAgencyDao extends BaseDao<ScreenCustomerAgencyEnt
* @date 2020/9/8 3:36 下午
*/
String selectPid(@Param("agencyId")String agencyId);
/**
* 返回当前客户下未匹配到的 街道区县级 组织信息
* @param customerId 客户id
* @param agencyIds 组织id集合
* @return java.util.List<com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity>
* @Author zhangyong
* @Date 14:38 2020-09-04
**/
List<ScreenCustomerAgencyEntity> selectListMismatcStreetAndDistrictAgencyInfo(@Param("customerId")String customerId, @Param("agencyIds") String[] agencyIds);
}

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

@ -62,11 +62,37 @@ public interface ScreenIndexDataMonthlyDao extends BaseDao<ScreenIndexDataMonthl
* 获取今年的各月份的平均值
* @param customerId
* @param yearId
* @param month 做除法运算
* @param monthCount (今年汇总的指数统计的总月数)做除法运算
* @return java.util.List<com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO>
* @Author zhangyong
* @Date 15:51 2020-09-04
**/
List<IndexDataMonthlyFormDTO> selectListIndexDataMonthlyByYear(@Param("customerId") String customerId,
@Param("yearId") String yearId, @Param("month") String month);
@Param("yearId") String yearId, @Param("monthCount") Integer monthCount);
/**
* 统计 今年汇总了几个月的 指数统计
* @param customerId
* @param yearId
* @return java.lang.Integer
* @Author zhangyong
* @Date 18:04 2020-09-11
**/
Integer selectCountIndexDataMonthly(@Param("customerId") String customerId,
@Param("yearId") String yearId);
/**
* 批量删除月表数据
* 根据CUSTOMER_IDMONTH_IDORG_TYPE进行查询如果有数据则先进行物理删除, 一次删除1000条
*
* @param customerId
* @param monthId
* @param orgType
* @return java.util.Integer
* @Author zhangyong
* @Date 10:52 2020-08-18
**/
Integer deleteIndexDataMonthlyByOrgType(@Param("customerId") String customerId,
@Param("monthId") String monthId,
@Param("orgType") String orgType);
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java

@ -87,4 +87,8 @@ public class AgencyScoreEntity extends BaseEpmetEntity {
*/
private String dataType;
/**
* 权重同一组权重总和=1
*/
private BigDecimal weight;
}

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

@ -87,4 +87,8 @@ public class AgencySubScoreEntity extends BaseEpmetEntity {
*/
private String dataType;
/**
* 权重同一组权重总和=1
*/
private BigDecimal weight;
}

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

@ -87,4 +87,9 @@ public class CpcScoreEntity extends BaseEpmetEntity {
* 是否是总分 1是0不是
*/
private String isTotal;
/**
* 权重同一组权重总和=1
*/
private BigDecimal weight;
}

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

@ -87,4 +87,9 @@ public class CpcSubScoreEntity extends BaseEpmetEntity {
* 是否是总分 1是0不是
*/
private String isTotal;
/**
* 权重同一组权重总和=1
*/
private BigDecimal weight;
}

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

@ -87,4 +87,8 @@ public class DeptScoreEntity extends BaseEpmetEntity {
*/
private String allParentIndexCode;
/**
* 权重同一组权重总和=1
*/
private BigDecimal weight;
}

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

@ -82,4 +82,8 @@ public class DeptSubScoreEntity extends BaseEpmetEntity {
*/
private String allParentIndexCode;
/**
* 权重同一组权重总和=1
*/
private BigDecimal weight;
}

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

@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity.evaluationindex.screen;
package com.epmet.entity.evaluationindex.indexcal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
@ -87,4 +87,9 @@ public class FactIndexCommunityScoreEntity extends BaseEpmetEntity {
*/
private String allParentIndexCode;
/**
* 权重同一组权重总和=1
*/
private BigDecimal weight;
}

70
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/FactIndexCommunitySubScoreEntity.java

@ -0,0 +1,70 @@
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_community_sub_score")
public class FactIndexCommunitySubScoreEntity extends BaseEpmetEntity {
private static final long serialVersionUID = -7046354032669198828L;
/**
* 客户Id
*/
private String customerId;
/**
* 组织id
*/
private String agencyId;
/**
* 社区上一级组织id
*/
private String parentAgencyId;
/**
* 年度ID: yyyy
*/
private String yearId;
/**
* 季度id: yyyyQ1yyyyQ2yyyyQ3yyyyQ4
*/
private String quarterId;
/**
* 月维度Id: yyyyMM
*/
private String monthId;
/**
* 分值
*/
private BigDecimal score;
/**
* 党建能力dangjiannengli治理能力zhilinengli服务能力fuwunengli社区相关shequxiangguan
*/
private String indexCode;
/**
* 所有指标code拼接的字符串 冒号隔开
*/
private String allParentIndexCode;
/**
* 权重同一组权重总和=1
*/
private BigDecimal weight;
}

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

@ -92,4 +92,8 @@ public class GridScoreEntity extends BaseEpmetEntity {
*/
private String allParentIndexCode;
/**
* 权重同一组权重总和=1
*/
private BigDecimal weight;
}

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

@ -92,4 +92,8 @@ public class GridSubScoreEntity extends BaseEpmetEntity {
*/
private String allParentIndexCode;
/**
* 权重同一组权重总和=1
*/
private BigDecimal weight;
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java

@ -98,7 +98,7 @@ public class FactIndexGovrnAblityOrgMonthlyEntity extends BaseEpmetEntity {
private BigDecimal satisfactionRatio;
/**
* 社区超期项目率dataTyp=commnuity有值
* 社区超期项目率dataTyp=community有值
*/
private BigDecimal overdueProjectRatio;

75
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java

@ -1,75 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity.evaluationindex.screen;
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-27
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("fact_index_community_five_score")
public class FactIndexCommunityFiveScoreEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 机关ID
*/
private String agencyId;
/**
* 月度ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年度ID
*/
private String yearId;
/**
* 指标ID
*/
private String indexId;
/**
* 分数
*/
private BigDecimal score;
/**
* 发文数量publish_article
*/
private String type;
}

17
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java

@ -92,4 +92,21 @@ public class ScreenIndexDataMonthlyEntity extends BaseEpmetEntity {
*/
private BigDecimal governAblity;
// PARTY_DEV_WEIGHT decimal 5 4 0 0 0 0 0 0 0 0 0 0 0
// SERVICE_ABLITY_WEIGHT decimal 5 4 0 0 0 0 0 0 0 0 0 0 0
// GOVERN_ABLITY_WEIGHT decimal 5 4 0 0 0 0 0 0 0 0 0 0 0
/**
* 党建能力指数权重
*/
private BigDecimal partyDevWeight;
/**
* 服务能力指数 权重
*/
private BigDecimal serviceAblityWeight;
/**
* 治理能力分数权重
*/
private BigDecimal governAblityWeight;
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenKcProjectCategoryGridDailyEntity.java

@ -69,12 +69,12 @@ public class ScreenKcProjectCategoryGridDailyEntity extends BaseEpmetEntity {
private String allParentIds;
/**
* 类别id
* 一级类别id
*/
private String categoryId;
/**
* 分类名称
* 一级分类名称
*/
private String categoryName;

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

@ -83,4 +83,13 @@ public class ScreenKcVolunteerHeatRankGridDailyEntity extends BaseEpmetEntity {
*/
private Integer heartTime;
/**
* 积分09-11新增
*/
private Integer points;
/**
* 志愿者id 09-11新增
*/
private String volunteerId;
}

31
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java → epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCalRedis.java

@ -24,12 +24,13 @@ import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@Slf4j
@Component
public class IndexCodeFieldReRedis {
public class IndexCalRedis {
@Autowired
private RedisTemplate redisTemplate;
@ -54,9 +55,37 @@ public class IndexCodeFieldReRedis {
/**
* desc:删除指标字段关系缓存
*
* @return
*/
public Boolean deleteIndexCodeFromRedis() {
return redisTemplate.delete(RedisKeys.getIndexCodeFieldReKey());
}
/**
* @Description 获取指标权重
*/
public Map<String, BigDecimal> getIndexCodeWeightMap(String customerId) {
HashOperations hashOperations = redisTemplate.opsForHash();
Map<String, BigDecimal> values = hashOperations.entries(RedisKeys.getIndexCodeWeightKey(customerId));
return values;
}
/**
* @Description 存入指标权重
*/
public void setIndexCodeWeightMap(String customerId, Map<String, BigDecimal> records) {
HashOperations hashOperations = redisTemplate.opsForHash();
hashOperations.putAll(RedisKeys.getIndexCodeWeightKey(customerId), records);
redisTemplate.expire(RedisKeys.getIndexCodeFieldReKey(), 1, TimeUnit.DAYS);
}
/**
* desc:删除指标权重缓存
*
* @return
*/
public Boolean deleteIndexCodeWeightFromRedis(String customerId) {
return redisTemplate.delete(RedisKeys.getIndexCodeWeightKey(customerId));
}
}

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

@ -50,7 +50,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
@Autowired
private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao;
@Autowired
private IndexGroupDetailService getDetailListByParentCode;
private IndexGroupDetailService indexGroupDetailService;
@Autowired
private IndexCodeFieldReService indexCodeFieldReService;
@Autowired
@ -72,46 +72,72 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
*/
private void calculateTotalScore(CalculateCommonFormDTO formDTO) {
//获取指标权重
List<IndexGroupDetailEntity> parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode());
List<IndexGroupDetailEntity> parentIndexDetails = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode());
if (CollectionUtils.isEmpty(parentIndexDetails)) {
log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
throw new RenException("客户【党员相关】指标权重信息不存在");
}
Map<String, CpcScoreEntity> cpcScoreTotalMap = new HashMap<>();
Map<String, IndexGroupDetailEntity> indexWeightMap = parentIndexDetails.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, o -> o));
int pageNo = NumConstant.ONE;
int pageSize = IndexCalConstant.PAGE_SIZE;
List<CpcScoreEntity> list = null;
//获取数据
List<CpcScoreEntity> list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode());
if (CollectionUtils.isEmpty(list)) {
log.error("calculateTotalScore cpcScoreDao.getPartScore return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId());
throw new RenException("客户四级指标分值记录不存在");
}
Map<String, List<CpcScoreEntity>> userGroupMap = list.stream().collect(Collectors.groupingBy(CpcScoreEntity::getUserId));
userGroupMap.forEach((userId, partScoreList) -> {
CpcScoreEntity totalEntity = null;
for (CpcScoreEntity part : partScoreList) {
IndexGroupDetailEntity indexGroupDetailEntity = indexWeightMap.get(part.getIndexCode());
if (indexGroupDetailEntity == null) {
log.error(" indexCode:{} 在指标明细中不存在", part.getIndexCode());
continue;
}
if (totalEntity == null) {
totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class);
totalEntity.setIsTotal(NumConstant.ONE_STR);
totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode());
totalEntity.setScore(new BigDecimal(NumConstant.ZERO));
totalEntity.setAllParentIndexCode(NumConstant.ZERO_STR);
cpcScoreTotalMap.put(userId, totalEntity);
Map<String, CpcScoreEntity> preLastCpcScoreTotalMap = new HashMap<>();
CpcScoreEntity currentLastCpcScore = null;
do {
//获取数据
list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), (pageNo - NumConstant.ONE) * pageSize, pageSize);
pageNo++;
if (CollectionUtils.isEmpty(list)) {
log.warn("calculateTotalScore cpcScoreDao.getPartScore return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId());
} else {
//获取最后一条
currentLastCpcScore = list.get(list.size() - 1);
if (preLastCpcScoreTotalMap.containsKey(currentLastCpcScore.getUserId())) {
cpcScoreTotalMap.putAll(preLastCpcScoreTotalMap);
preLastCpcScoreTotalMap.put(currentLastCpcScore.getUserId(), null);
}
//自建群活跃度——议题转项目率 有阈值 >60%按60%算
BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight());
log.info("userId:{},分数:{},权重:{},total:{}", userId, part.getScore(), indexGroupDetailEntity.getWeight(), total);
totalEntity.setScore(totalEntity.getScore().add(total));
Map<String, List<CpcScoreEntity>> userGroupMap = list.stream().collect(Collectors.groupingBy(CpcScoreEntity::getUserId));
userGroupMap.forEach((userId, partScoreList) -> {
CpcScoreEntity totalEntity = null;
for (CpcScoreEntity part : partScoreList) {
IndexGroupDetailEntity indexGroupDetailEntity = indexWeightMap.get(part.getIndexCode());
if (indexGroupDetailEntity == null) {
log.error(" indexCode:{} 在指标明细中不存在", part.getIndexCode());
continue;
}
if (totalEntity == null) {
totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class);
totalEntity.setIsTotal(NumConstant.ONE_STR);
totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode());
totalEntity.setScore(new BigDecimal(NumConstant.ZERO));
totalEntity.setAllParentIndexCode(NumConstant.ZERO_STR);
totalEntity.setWeight(new BigDecimal(NumConstant.ONE_NEG));
if (preLastCpcScoreTotalMap.containsKey(part.getUserId())) {
preLastCpcScoreTotalMap.put(part.getUserId(), part);
} else {
cpcScoreTotalMap.put(userId, totalEntity);
}
}
//自建群活跃度——议题转项目率 有阈值 >60%按60%算
BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight());
log.info("userId:{},分数:{},权重:{},total:{}", userId, part.getScore(), indexGroupDetailEntity.getWeight(), total);
totalEntity.setScore(totalEntity.getScore().add(total));
}
});
}
});
//删除总分 然后插入
cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE, NumConstant.ONE_STR);
insertCpcScoreBatch(formDTO, cpcScoreTotalMap.values().stream().collect(Collectors.toList()), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode());
//没查询到数据 就把上次的放进去
if (list == null || list.size() < pageSize || !CollectionUtils.isEmpty(preLastCpcScoreTotalMap)) {
cpcScoreTotalMap.putAll(preLastCpcScoreTotalMap);
}
//删除总分 然后插入
cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCalConstant.DELETE_SIZE, NumConstant.ONE_STR);
insertCpcScoreBatch(formDTO, cpcScoreTotalMap.values().stream().collect(Collectors.toList()), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode());
} while (!CollectionUtils.isEmpty(list));
}
/**
@ -157,7 +183,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
private void calculatePartScore(CalculateCommonFormDTO formDTO) {
//计算最大最小值
Map<String, Object> minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId());
Map<String, Object> minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(minAndMaxMap)) {
log.error("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId());
throw new RenException("指标原始数据记录不存在");
@ -173,9 +199,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
int pageSize = IndexCalConstant.PAGE_SIZE;
//分页查询 要计算的原始数据
List<Map<String, Object>> list = null;
groupIndexDetailsMap.keySet().forEach(indexCode -> {
deleteOldData(formDTO, indexCode);
});
groupIndexDetailsMap.keySet().forEach(indexCode -> deleteOldData(formDTO, indexCode));
do {
list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize);
if (!CollectionUtils.isEmpty(list)) {
@ -242,6 +266,8 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
cpcScoreEntity.setScore(new BigDecimal(NumConstant.ZERO));
cpcScoreEntity.setIndexCode(parentIndexCode);
cpcScoreEntity.setAllParentIndexCode(value.getAllParentIndexCode());
BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(formDTO.getCustomerId(), value.getAllParentIndexCode());
cpcScoreEntity.setWeight(weight);
scoreEntityMap.put(userId, cpcScoreEntity);
//构造样本值对象
@ -288,6 +314,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
child.setIndexCode(o.getIndexCode());
child.setAllParentIndexCode(o.getAllParentIndexCode());
child.setScore(o.getScore());
child.setWeight(o.getWeight());
subList.add(child);
});
@ -380,17 +407,17 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
*/
private Map<String, List<IndexGroupDetailEntity>> getIndexDetailMap(CalculateCommonFormDTO formDTO) {
//获取指标权重信息 -参与议事
List<IndexGroupDetailEntity> canyuyishiIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.CAN_YU_YI_SHI.getCode());
List<IndexGroupDetailEntity> canyuyishiIndexDetails = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.CAN_YU_YI_SHI.getCode());
if (CollectionUtils.isEmpty(canyuyishiIndexDetails)) {
log.error("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
return null;
}
List<IndexGroupDetailEntity> dangwuhongdongIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_WU_HUO_DONG.getCode());
List<IndexGroupDetailEntity> dangwuhongdongIndexDetails = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_WU_HUO_DONG.getCode());
if (CollectionUtils.isEmpty(canyuyishiIndexDetails)) {
log.error("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
return null;
}
List<IndexGroupDetailEntity> lianxiqunzhongIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.LIAN_XI_QUN_ZHONG.getCode());
List<IndexGroupDetailEntity> lianxiqunzhongIndexDetails = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), IndexCodeEnum.LIAN_XI_QUN_ZHONG.getCode());
if (CollectionUtils.isEmpty(canyuyishiIndexDetails)) {
log.error("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
return null;

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

@ -17,7 +17,6 @@
package com.epmet.service.evaluationindex.indexcal.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
@ -31,7 +30,9 @@ import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao;
import com.epmet.dao.evaluationindex.indexcal.DeptSubScoreDao;
import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao;
import com.epmet.dao.evaluationindex.screen.ScreenCustomerDeptDao;
import com.epmet.dto.indexcal.*;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.indexcal.DeotScore;
import com.epmet.dto.indexcal.DeptScoreDetailDTO;
import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity;
import com.epmet.entity.evaluationindex.indexcal.DeptSubScoreEntity;
import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity;
@ -77,7 +78,7 @@ import java.util.stream.Collectors;
@Service
public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScoreEntity> implements DeptScoreService {
@Autowired
private IndexGroupDetailService getDetailListByParentCode;
private IndexGroupDetailService indexGroupDetailService;
@Autowired
private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao;
@Autowired
@ -116,11 +117,11 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
**/
private void calculateZhiLiNengLiScore(CalculateCommonFormDTO formDTO) {
//获取区直部门的治理能力下,五级指标权重
List<IndexGroupDetailEntity> indexGroupDetailEntityList = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(),
List<IndexGroupDetailEntity> indexGroupDetailEntityList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(),
IndexCodeEnum.QU_ZHI_BU_MEN.getCode(),
IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
if (CollectionUtils.isEmpty(indexGroupDetailEntityList)) {
log.warn("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
log.error("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
throw new RenException("客户【区直部门:治理能力】下级指标权重信息不存在");
}
// log.info(JSON.toJSONString(indexGroupDetailEntityList));
@ -166,17 +167,19 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
**/
private void calculateDeptTotalScore(CalculateCommonFormDTO formDTO) {
//计算区直部门总分
List<IndexGroupDetailEntity> indexList = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(),
List<IndexGroupDetailEntity> indexList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(),
IndexCodeEnum.QU_ZHI_BU_MEN.getCode());
if (CollectionUtils.isEmpty(indexList)) {
log.warn("calculateDeptTotalScore customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
log.error("calculateDeptTotalScore customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
throw new RenException("客户【区直部门】下级指标权重信息不存在");
}
//查询总记录数
List<DeotScore> deptScoreDTOList = deptScoreDao.selectList(formDTO);
if(CollectionUtils.isEmpty(deptScoreDTOList)){
log.error("calculateDeptTotalScore deptScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId());
throw new RenException("客户一级指标分值记录不存在");
log.warn("calculateDeptTotalScore deptScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId());
// throw new RenException("客户一级指标分值记录不存在");
log.warn(String.format("customerId=%s,monthId=%s,fact_index_dept_score have not any fact record", formDTO.getCustomerId(), formDTO.getMonthId()));
return;
}
Map<String, IndexGroupDetailEntity> indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity()));
List<DeptScoreEntity> deotScoreEntityList = new ArrayList<>();
@ -186,6 +189,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
deptScoreEntity.setIndexCode(IndexCodeEnum.QU_ZHI_BU_MEN.getCode());
deptScoreEntity.setScore(BigDecimal.ZERO);
deptScoreEntity.setAllParentIndexCode(NumConstant.ZERO_STR);
deptScoreEntity.setWeight(new BigDecimal(NumConstant.ONE_NEG));
for (DeptScoreDetailDTO deptScoreDetailDTO : deptScore.getDetailList()) {
BigDecimal indexScore = deptScoreDetailDTO.getScore().multiply(indexMap.get(deptScoreDetailDTO.getIndexCode()).getWeight());
deptScoreEntity.setScore(deptScoreEntity.getScore().add(indexScore));
@ -258,7 +262,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
indexMap.forEach((key, indexInputVO) -> {
if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) {
//对应的数值
String sampleValueStr =String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key)));
String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key)));
//构造样本值对象
SampleValue<BigDecimal> currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.DEPT_ID), new BigDecimal(sampleValueStr));
indexInputVO.getIndexValueVOs().add(currentGridIndexValue);
@ -268,8 +272,10 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
});
HashMap<String, CalculateResult> resultMap = gridCorreLationService.calculate(indexMap);
//保存中间表记录
this.saveDeptScoreEntity(formDTO,resultMap);
if (!CollectionUtils.isEmpty(resultMap)) {
//保存中间表记录
this.saveDeptScoreEntity(formDTO, resultMap);
}
}
/**
@ -305,13 +311,17 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
//区直部门治理能力的 上一级是 quzhibumen
////新增ALL_PARENT_INDEX_CODE 所有指标code拼接的字符串 冒号隔开
deptScoreEntity.setAllParentIndexCode(IndexCodeEnum.QU_ZHI_BU_MEN.getCode());
String allPath = deptScoreEntity.getAllParentIndexCode().concat(StrConstant.COLON).concat(deptScoreEntity.getIndexCode());
BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(formDTO.getCustomerId(), allPath);
deptScoreEntity.setWeight(weight);
deptScoreEntityList.add(deptScoreEntity);
for(IndexScoreVo detail:calculateResult.getDetails()){
DeptSubScoreEntity deptSubScore= ConvertUtils.sourceToTarget(deptScoreEntity, DeptSubScoreEntity.class);
for (IndexScoreVo detail : calculateResult.getDetails()) {
DeptSubScoreEntity deptSubScore = ConvertUtils.sourceToTarget(deptScoreEntity, DeptSubScoreEntity.class);
//重新赋值
deptSubScore.setIndexCode(detail.getIndexCode());
deptSubScore.setAllParentIndexCode(detail.getAllParentIndexCode());
deptSubScore.setScore(detail.getScore());
deptSubScore.setWeight(detail.getWeight());
deptSubScoreEntityList.add(deptSubScore);
}
});
@ -339,7 +349,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
//获取指标对应的列名
String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode());
if (StringUtils.isBlank(fieldName)) {
log.error("index_code:{} not find field_name", index.getIndexCode());
log.warn("index_code:{} not find field_name", index.getIndexCode());
continue;
}
String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN);

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

@ -106,7 +106,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(),
IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
if (CollectionUtils.isEmpty(indexList)) {
log.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
log.error("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
throw new RenException("客户【网格相关:党建能力】指标权重信息不存在");
}
//查询总记录数
@ -121,7 +121,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
//每一组指标的最大值,key:code_MIN/MAX
Map<String, Object> minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(minAndMaxMap)) {
log.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId());
log.warn("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId());
return;
}
//指标集合
@ -140,7 +140,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
recordList.forEach(recordMap -> {
//遍历所有的指标
indexMap.forEach((key, value) -> {
log.info("index_code :{}",key);
// log.info("index_code :{}",key);
if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) {
//组织内党员的联系群众能力考评分(平均值)
// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理");
@ -356,7 +356,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
if(StringUtils.isNotBlank(screenCustomerGridDTO.getParentAgencyId())){
gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId());
}
if(StringUtils.isNotBlank(screenCustomerGridDTO.getAllParentIds())){
if (StringUtils.isNotBlank(screenCustomerGridDTO.getAllParentIds())) {
gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds());
}
}
@ -366,13 +366,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
gridScoreEntity.setScore(calculateResult.getTotalScore());
//新增ALL_PARENT_INDEX_CODE 所有指标code拼接的字符串 冒号隔开
gridScoreEntity.setAllParentIndexCode(IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode());
BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(formDTO.getCustomerId(), gridScoreEntity.getAllParentIndexCode().concat(StrConstant.COLON).concat(gridScoreEntity.getIndexCode()));
gridScoreEntity.setWeight(weight);
gridScoreEntityList.add(gridScoreEntity);
for(IndexScoreVo detail:calculateResult.getDetails()){
GridSubScoreEntity gridSubScoreEntity= ConvertUtils.sourceToTarget(gridScoreEntity, GridSubScoreEntity.class);
for (IndexScoreVo detail : calculateResult.getDetails()) {
GridSubScoreEntity gridSubScoreEntity = ConvertUtils.sourceToTarget(gridScoreEntity, GridSubScoreEntity.class);
//重新赋值
gridSubScoreEntity.setIndexCode(detail.getIndexCode());
gridSubScoreEntity.setAllParentIndexCode(detail.getAllParentIndexCode());
gridSubScoreEntity.setScore(detail.getScore());
gridSubScoreEntity.setWeight(detail.getWeight());
gridSubScoreList.add(gridSubScoreEntity);
}
});
@ -463,7 +466,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
//获取指标对应的列名
String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode());
if (StringUtils.isBlank(fieldName)) {
log.error("index_code:{} not find field_name",index.getIndexCode());
log.warn("index_code:{} not find field_name",index.getIndexCode());
continue;
}
// log.info("index_code2:{} ,field_name:{}",index.getIndexCode(),fieldName);
@ -509,7 +512,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(),
IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
if (CollectionUtils.isEmpty(indexList)) {
log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
log.error("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
throw new RenException("客户【网格相关:治理能力】指标权重信息不存在");
}
//查询总记录数
@ -524,7 +527,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
//每一组指标的最大值,key:code_MIN/MAX
Map<String, Object> minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(minAndMaxMap)) {
log.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId());
log.warn("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId());
return;
}
//指标集合
@ -582,7 +585,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(),
IndexCodeEnum.FU_WU_NENG_LI.getCode());
if (CollectionUtils.isEmpty(indexList)) {
log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
log.error("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
throw new RenException("客户【网格相关:服务能力】指标权重信息不存在");
}
//查询总记录数
@ -597,7 +600,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
//每一组指标的最大值,key:code_MIN/MAX
Map<String, Object> minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(minAndMaxMap)) {
log.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId());
log.warn("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId());
return;
}
//指标集合
@ -623,7 +626,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
SampleValue<BigDecimal> currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr));
value.getIndexValueVOs().add(currentGridIndexValue);
} else {
log.error("index_code:" + key + " not find field_name");
log.warn("index_code:" + key + " not find field_name");
}
});
});
@ -649,14 +652,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
List<IndexGroupDetailEntity> indexList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(),
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode());
if (CollectionUtils.isEmpty(indexList)) {
log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
log.error("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
throw new RenException("客户【网格相关】指标权重信息不存在");
}
//查询总记录数
List<GridScoreDTO> gridScoreDTOList = gridScoreDao.selectList(formDTO);
if(CollectionUtils.isEmpty(gridScoreDTOList)){
log.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId());
throw new RenException("客户一级指标分值记录不存在");
log.warn("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId());
// throw new RenException("客户一级指标分值记录不存在");
return;
}
Map<String, IndexGroupDetailEntity> indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity()));
List<GridScoreEntity> gridScoreEntityList = new ArrayList<>();
@ -666,6 +670,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
gridScoreEntity.setIndexCode(IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode());
gridScoreEntity.setScore(BigDecimal.ZERO);
gridScoreEntity.setAllParentIndexCode(NumConstant.ZERO_STR);
gridScoreEntity.setWeight(new BigDecimal(NumConstant.ONE_NEG));
log.warn("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失");
for (GridScoreDetailDTO gridScoreDetailDTO : gridScoreDTO.getDetailList()) {
BigDecimal indexScore = gridScoreDetailDTO.getScore().multiply(indexMap.get(gridScoreDetailDTO.getIndexCode()).getWeight());

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

@ -4,6 +4,7 @@ import com.alibaba.druid.util.StringUtils;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
@ -322,13 +323,16 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
score.setQuarterId(DateUtils.getQuarterId(monthId));
score.setIndexCode(IndexCalConstant.COMMUNITY_RELATE);
score.setAllParentIndexCode(NumConstant.ZERO_STR);
score.setWeight(new BigDecimal(NumConstant.ONE_NEG));
value.forEach(community -> {
score.setScore(score.getScore().add(community.getScore()));
score.setParentAgencyId(community.getParentAgencyId());
});
result.add(score);
});
factIndexCommunityScoreDao.insertCommunityPartyRecord(result);
if (!CollectionUtils.isEmpty(result)){
factIndexCommunityScoreDao.insertCommunityPartyRecord(result);
}
return true;
}
@ -439,6 +443,9 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
score.setIndexCode(indexCode);
score.setScore(v.getTotalScore());
score.setAllParentIndexCode(allParentIndexCode);
String allPath = allParentIndexCode.concat(StrConstant.COLON).concat(indexCode);
BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(customerId, allPath);
score.setWeight(weight);
pid.forEach((agency, parentAgency) -> {
if (k.equals(agency)) {
score.setParentAgencyId(parentAgency);
@ -456,6 +463,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
s.setIndexCode(fiveDetail.getIndexCode());
s.setScore(fiveDetail.getScore());
s.setAllParentIndexCode(fiveDetail.getAllParentIndexCode());
s.setWeight(fiveDetail.getWeight());
pid.forEach((agency, parentAgency) -> {
if (k.equals(agency)) {
s.setParentAgencyId(parentAgency);

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

@ -4,6 +4,7 @@ import com.alibaba.druid.util.StringUtils;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
@ -321,6 +322,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
score.setDataType(IndexCalConstant.DISTRICT_LEVEL);
score.setIndexCode(IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode());
score.setAllParentIndexCode(NumConstant.ZERO_STR);
score.setWeight(new BigDecimal(NumConstant.ONE_NEG));
value.forEach(community -> {
score.setScore(score.getScore().add(community.getScore()));
score.setParentAgencyId(community.getParentAgencyId());
@ -415,13 +417,16 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
score.setScore(v.getTotalScore());
score.setAllParentIndexCode(allParentIndexCode);
score.setDataType(IndexCalConstant.DISTRICT_LEVEL);
String allPath = allParentIndexCode.concat(StrConstant.COLON).concat(indexCode);
BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(customerId, allPath);
score.setWeight(weight);
pid.forEach((agency, parentAgency) -> {
//todo 确认
if (k != null && k.equals(agency)) {
score.setParentAgencyId(parentAgency);
}
});
if (!CollectionUtils.isEmpty(v.getDetails())){
if (!CollectionUtils.isEmpty(v.getDetails())) {
v.getDetails().forEach(streetScore -> {
AgencyScoreDTO s = new AgencyScoreDTO();
s.setCustomerId(customerId);
@ -434,6 +439,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
s.setScore(streetScore.getScore());
s.setAllParentIndexCode(streetScore.getAllParentIndexCode());
s.setDataType(IndexCalConstant.DISTRICT_LEVEL);
s.setWeight(streetScore.getWeight());
pid.forEach((agency, parentAgency) -> {
//todo 确认
if (k != null && k.equals(agency)) {

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

@ -4,12 +4,11 @@ import com.alibaba.fastjson.JSON;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.redis.IndexCodeFieldReRedis;
import com.epmet.redis.IndexCalRedis;
import com.epmet.service.evaluationindex.indexcal.*;
import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService;
import com.epmet.util.DimIdGenerator;
@ -37,7 +36,7 @@ public class IndexCalculateServiceImpl implements IndexCalculateService {
@Autowired
private CpcIndexCalculateService cpcIndexCalculateService;
@Autowired
private IndexCodeFieldReRedis indexCodeFieldReRedis;
private IndexCalRedis indexCalRedis;
@Autowired
private IndexCalculateCommunityService indexCalculateCommunityService;
@Autowired
@ -71,96 +70,106 @@ public class IndexCalculateServiceImpl implements IndexCalculateService {
}
Boolean flag = false;
for (String customerId : customerIds) {
CalculateCommonFormDTO calculateCommonFormDTO = new CalculateCommonFormDTO(customerId, formDTO.getMonthId());
long start = System.currentTimeMillis();
CalculateCommonFormDTO param = new CalculateCommonFormDTO();
param.setCustomerId(customerId);
param.setMonthId(formDTO.getMonthId());
flag = calulateCustomerIndexScore(param);
}
return flag;
} catch (Exception e) {
log.error("indexCalculate exception,param:{}", JSON.toJSONString(formDTO));
} finally {
//清除缓存
indexCalRedis.deleteIndexCodeFromRedis();
}
return false;
}
private Boolean calulateCustomerIndexScore(CalculateCommonFormDTO formDTO) {
try {
String customerId = formDTO.getCustomerId();
Boolean flag;
long start = System.currentTimeMillis();
try {
//计算党员相关的
try {
//计算党员相关的
try {
CalculateCommonFormDTO param = new CalculateCommonFormDTO(customerId, formDTO.getMonthId());
flag = cpcIndexCalculateService.cpcIndexCalculate(param);
log.info("indexCalculate cpcIndexCalculate return result:{}", flag);
} catch (Exception e) {
log.error("indexCalculate cpcIndexCalculate exception", e);
throw new RenException("indexCalculate cpcIndexCalculate exception", e);
}
//测试用
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【党员相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒");
//计算网格
start = System.currentTimeMillis();
try {
flag = gridCorreLationService.calculateGridCorreLation(calculateCommonFormDTO);
log.info("indexCalculate calculateGridCorreLation return result:{}", flag);
} catch (Exception e) {
log.error("indexCalculate calculateGridCorreLation exception", e);
throw new RenException("indexCalculate calculateGridCorreLation exception", e);
}
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【网格相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒");
//计算社区
start = System.currentTimeMillis();
try {
flag = indexCalculateCommunityService.calCommunityAll(customerId, formDTO.getMonthId());
log.info("indexCalculate calCommunityAll return result:{}", flag);
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【社区相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒");
} catch (Exception e) {
log.error("indexCalculate calCommunityAll exception", e);
throw new RenException("indexCalculate calAll exception", e);
}
flag = cpcIndexCalculateService.cpcIndexCalculate(formDTO);
log.info("客户Id:{}【党员相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag);
} catch (Exception e) {
log.error("indexCalculate cpcIndexCalculate exception", e);
throw new RenException("indexCalculate cpcIndexCalculate exception", e);
}
//测试用
//计算网格
start = System.currentTimeMillis();
try {
flag = gridCorreLationService.calculateGridCorreLation(formDTO);
log.info("客户Id:{}【网格相关】计算完毕,总耗时:{}秒,result:{},result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag);
} catch (Exception e) {
log.error("indexCalculate calculateGridCorreLation exception", e);
throw new RenException("indexCalculate calculateGridCorreLation exception", e);
}
//计算社区
start = System.currentTimeMillis();
try {
flag = indexCalculateCommunityService.calCommunityAll(customerId, formDTO.getMonthId());
log.info("客户Id:{}【社区相关】计算完毕,总耗时:{}秒,result:{},result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag);
} catch (Exception e) {
log.error("indexCalculate calCommunityAll exception", e);
throw new RenException("indexCalculate calAll exception", e);
}
//计算街道
start = System.currentTimeMillis();
try {
flag = indexCalculateStreetService.calStreetAll(customerId, formDTO.getMonthId());
log.info("indexCalculate calStreetAll return result:{}", flag);
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【街道相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒");
} catch (Exception e) {
log.error("indexCalculate calStreetAll exception", e);
throw new RenException("indexCalculate calStreetAll exception", e);
}
//计算街道
start = System.currentTimeMillis();
try {
flag = indexCalculateStreetService.calStreetAll(customerId, formDTO.getMonthId());
log.info("客户Id:{}【街道相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag);
} catch (Exception e) {
log.error("indexCalculate calStreetAll exception", e);
throw new RenException("indexCalculate calStreetAll exception", e);
}
//计算区直属
start = System.currentTimeMillis();
try {
flag = deptScoreService.calculateDeptCorreLation(calculateCommonFormDTO);
log.info("indexCalculate calculateDeptCorreLation return result:{}", flag);
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【区直部门】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒");
} catch (Exception e) {
log.error("indexCalculate calculateDeptCorreLation exception", e);
throw new RenException("indexCalculate calculateDeptCorreLation exception", e);
}
//计算区直属
start = System.currentTimeMillis();
try {
flag = deptScoreService.calculateDeptCorreLation(formDTO);
log.info("客户Id:{}【区直部门】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag);
} catch (Exception e) {
log.error("indexCalculate calculateDeptCorreLation exception", e);
throw new RenException("indexCalculate calculateDeptCorreLation exception", e);
}
//计算全区
start = System.currentTimeMillis();
try {
indexCalculateDistrictService.calDistrictAll(customerId, formDTO.getMonthId());
log.info("indexCalculate calDistrictAll return result:{}", flag);
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 【全区相关】计算完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒");
} catch (Exception e) {
log.error("indexCalculate calDistrictAll exception", e);
throw new RenException("indexCalculate calDistrictAll exception", e);
}
} catch (RenException e) {
flag = false;
//计算全区
start = System.currentTimeMillis();
try {
indexCalculateDistrictService.calDistrictAll(customerId, formDTO.getMonthId());
log.info("客户Id:{}【全区相关】计算完毕,总耗时:{}秒,result:{}", customerId, (System.currentTimeMillis() - start) / 1000, flag);
} catch (Exception e) {
log.error("indexCalculate calDistrictAll exception", e);
throw new RenException("indexCalculate calDistrictAll exception", e);
}
} catch (RenException e) {
flag = false;
}
//计算完毕后 将结果插入大屏相关数据表
if (flag) {
start = System.currentTimeMillis();
try {
factIndexCollectService.insertScreenIndexDataMonthlyAndYearly(formDTO.getMonthId(), formDTO.getCustomerId());
HttpClientManager.getInstance().sendAlarmMsg("客户Id:" + customerId + " 分数插入到大屏显示库完毕,总耗时:" + (System.currentTimeMillis() - start) / 1000 + "秒");
} catch (Exception e) {
log.error("indexCalculate insertScreenIndexDataMonthlyAndYearly exception", e);
flag = false;
}
//计算完毕后 将结果插入大屏相关数据表
if (flag) {
start = System.currentTimeMillis();
try {
factIndexCollectService.insertScreenIndexDataMonthlyAndYearly(formDTO.getMonthId(), formDTO.getCustomerId());
log.info("客户Id:{}分数插入到大屏显示库完毕,总耗时:{}秒", customerId, (System.currentTimeMillis() - start) / 1000);
} catch (Exception e) {
log.error("indexCalculate insertScreenIndexDataMonthlyAndYearly exception", e);
flag = false;
}
}
return flag;
} catch (Exception e) {
log.error("indexCalculate exception,param:{}", JSON.toJSONString(formDTO));
log.error("calulateCustomerIndexScore exception", e);
} finally {
//清除缓存
indexCodeFieldReRedis.deleteIndexCodeFromRedis();
indexCalRedis.deleteIndexCodeWeightFromRedis(formDTO.getCustomerId());
}
return false;
}

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

@ -4,6 +4,7 @@ import com.alibaba.druid.util.StringUtils;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
@ -351,13 +352,16 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
score.setIndexCode(IndexCodeEnum.JIE_DAO_XIANG_GUAN.getCode());
score.setDataType(IndexCalConstant.STREET_LEVEL);
score.setAllParentIndexCode(NumConstant.ZERO_STR);
score.setWeight(new BigDecimal(NumConstant.ONE_NEG));
value.forEach(street -> {
score.setScore(score.getScore().add(street.getScore()));
score.setParentAgencyId(street.getParentAgencyId());
});
result.add(score);
});
agencyScoreDao.insertStreetRecord(result);
if (!CollectionUtils.isEmpty(result)){
agencyScoreDao.insertStreetRecord(result);
}
return true;
}
@ -443,12 +447,15 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
score.setScore(v.getTotalScore());
score.setAllParentIndexCode(allParentIndexCode);
score.setDataType(IndexCalConstant.STREET_LEVEL);
String allPath = allParentIndexCode.concat(StrConstant.COLON).concat(indexCode);
BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(customerId, allPath);
score.setWeight(weight);
pid.forEach((agency, parentAgency) -> {
if (k.equals(agency)) {
score.setParentAgencyId(parentAgency);
}
});
if (!CollectionUtils.isEmpty(v.getDetails())){
if (!CollectionUtils.isEmpty(v.getDetails())) {
v.getDetails().forEach(streetScore -> {
AgencyScoreDTO s = new AgencyScoreDTO();
s.setCustomerId(customerId);
@ -461,6 +468,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
s.setScore(streetScore.getScore());
s.setDataType(IndexCalConstant.STREET_LEVEL);
s.setAllParentIndexCode(streetScore.getAllParentIndexCode());
s.setWeight(streetScore.getWeight());
pid.forEach((agency, parentAgency) -> {
if (k.equals(agency)) {
s.setParentAgencyId(parentAgency);

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

@ -4,7 +4,7 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.screen.IndexCodeFieldReDao;
import com.epmet.entity.evaluationindex.screen.IndexCodeFieldReEntity;
import com.epmet.redis.IndexCodeFieldReRedis;
import com.epmet.redis.IndexCalRedis;
import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -25,18 +25,18 @@ public class IndexCodeFieldReServiceImpl implements IndexCodeFieldReService {
private IndexCodeFieldReDao indexCodeFieldReDao;
@Autowired
private IndexCodeFieldReRedis indexCodeFieldReRedis;
private IndexCalRedis indexCalRedis;
@Override
public Map<String, String> getIndexCodeFieldReMap() {
Map<String, String> indexCodeFiledReMap = indexCodeFieldReRedis.getIndexCodeFiledReMap();
Map<String, String> indexCodeFiledReMap = indexCalRedis.getIndexCodeFiledReMap();
if (CollectionUtils.isEmpty(indexCodeFiledReMap)) {
List<IndexCodeFieldReEntity> allData = indexCodeFieldReDao.getAllData();
if (CollectionUtils.isEmpty(allData)){
return new HashMap<>();
}
indexCodeFiledReMap = allData.stream().collect(Collectors.toMap(IndexCodeFieldReEntity::getIndexCode, o -> o.getFieldId()));
indexCodeFieldReRedis.setIndexCodeFiledReMap(indexCodeFiledReMap);
indexCalRedis.setIndexCodeFiledReMap(indexCodeFiledReMap);
}
return indexCodeFiledReMap;
}

92
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java

@ -198,12 +198,22 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
if (NumConstant.SIX != monthId.length()){
throw new RuntimeException("入参monthId格式不正确:monthId =" + monthId);
}
// 根据网格类型,删除 指数-指数数据(每月数值)表中 匹配的数据
this.batchDelIndexDataMonthly(customerId, monthId, OrgTypeConstant.GRID);
// 开始处理 网格相关分值表
this.startHandleIndexGridScore(monthId, customerId);
// 根据组织类型,删除 指数-指数数据(每月数值)表中 匹配的数据
this.batchDelIndexDataMonthly(customerId, monthId, OrgTypeConstant.AGENCY);
// 开始处理 社区相关分值表
this.startHandleIndexCommunityScore(monthId, customerId);
// 根据部门类型,删除 指数-指数数据(每月数值)表中 匹配的数据
this.batchDelIndexDataMonthly(customerId, monthId, OrgTypeConstant.DEPARTMENT);
// 开始处理 区直部门分值表
this.startHandleIndexDeptScore(monthId, customerId);
// 同样是 组织类型,所以不再重复删除了
// 开始处理 区/街道相关分数表
this.startHandleIndexAgencyScore(monthId, customerId);
@ -236,16 +246,15 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
} else {
mismatchGridList = screenCustomerGridDao.selectListMismatchGridInfo(customerId, null);
}
boolean delFlag = true;
if (!CollectionUtils.isEmpty(mismatchGridList)){
// 如果进行不匹配查询,查到了其他网格信息,一律赋默认值
this.insertIndexMonthlyByGridDefaultScore(monthId, customerId, mismatchGridList);
delFlag = false;
}
// fact_index_grid_score 网格相关分值记录表 grid
List<FactIndexGridScoreDTO> gridScoreDTOS = factIndexGridScoreDao.selectListGridScore(customerId, monthId);
// 开始处理实际分数
this.insertIndexDataMonthlyByGridScore(delFlag, monthId, customerId, gridScoreDTOS);
this.insertIndexDataMonthlyByGridScore(monthId, customerId, gridScoreDTOS);
}
/**
@ -267,22 +276,21 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
monthlyDTO.setPartyDevAblity(zero);
monthlyDTO.setServiceAblity(zero);
monthlyDTO.setGovernAblity(zero);
// 9.12 增加权重
monthlyDTO.setPartyDevWeight(zero);
monthlyDTO.setServiceAblityWeight(zero);
monthlyDTO.setGovernAblityWeight(zero);
// 补充表中其他字段
monthlyDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, gridScoreDTOS.get(i).getGridId(),
gridScoreDTOS.get(i).getParentAgencyId(), gridScoreDTOS.get(i).getGridName(), monthlyDTO);
monthlyFormDTOList.add(monthlyDTO);
}
int deleteNum;
do {
deleteNum = screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId,monthId);
} while (deleteNum > NumConstant.ZERO);
screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId);
}
/**
* 将网格相关分值记录表 数据 插入月表 screenIndexDataMonthlyDao
*
* @param delFlag true: 执行删除语句false已经删过一次了本次只添加不删除
* @param monthId 202008
* @param customerId 客户id
* @param gridScoreDTOS 网格相关分值记录表 当前客户所属月份数据集
@ -290,7 +298,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
* @Author zhangyong
* @Date 14:17 2020-09-03
**/
private void insertIndexDataMonthlyByGridScore(boolean delFlag, String monthId, String customerId, List<FactIndexGridScoreDTO> gridScoreDTOS){
private void insertIndexDataMonthlyByGridScore(String monthId, String customerId, List<FactIndexGridScoreDTO> gridScoreDTOS){
List<IndexDataMonthlyFormDTO> monthlyFormDTOList = new ArrayList<>();
// 根据网格id进行分组,最后组装一条数据 一个网格 对应 4条数据
Map<String, List<FactIndexGridScoreDTO>> collect = gridScoreDTOS.stream().collect(Collectors.groupingBy(FactIndexGridScoreDTO::getGridId));
@ -311,6 +319,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
} else {
// 赋实际值 党建能力、治理能力、服务能力
monthlyFormDTO = this.setValueAbilityMonthlyFor(gridScore.getValue().get(i).getIndexCode(),
gridScore.getValue().get(i).getWeight(),
gridScore.getValue().get(i).getScore(),
monthlyFormDTO);
}
@ -333,12 +342,6 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
monthlyFormDTOList.add(monthlyFormDTO);
}
if (monthlyFormDTOList.size() > NumConstant.ZERO){
if (delFlag){
int deleteNum;
do {
deleteNum = screenIndexDataMonthlyDao.deleteIndexDataMonthly(customerId,monthId);
} while (deleteNum > NumConstant.ZERO);
}
screenIndexDataMonthlyDao.batchInsertIndexDataMonthly(monthlyFormDTOList, customerId);
}
}
@ -363,11 +366,12 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
for (int i = NumConstant.ZERO; i < indexCommunityIds.size(); i++){
communityIds[i] = indexCommunityIds.get(i);
}
// 进行不匹配查询(即返回社区相关分值表 中不存在的社区信息)。
mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcAgencyInfo(customerId, communityIds);
// 进行不匹配查询(即返回社区相关分值表 中不存在的社区级】 组织信息)。
mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcCommunityAgencyInfo(customerId, communityIds);
} else {
mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcAgencyInfo(customerId, null);
mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcCommunityAgencyInfo(customerId, null);
}
if (!CollectionUtils.isEmpty(mismatchAgencyList)){
// 如果进行不匹配查询,查到了其他社区信息,一律赋默认值
this.insertIndexMonthlyByAgencyDefaultScore(monthId, customerId, mismatchAgencyList);
@ -398,8 +402,12 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
monthlyDTO.setPartyDevAblity(zero);
monthlyDTO.setServiceAblity(zero);
monthlyDTO.setGovernAblity(zero);
// 9.12 增加权重
monthlyDTO.setPartyDevWeight(zero);
monthlyDTO.setServiceAblityWeight(zero);
monthlyDTO.setGovernAblityWeight(zero);
// 补充表中其他字段
monthlyDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, communityScoreDTOS.get(i).getAgencyId(),
monthlyDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.AGENCY, communityScoreDTOS.get(i).getAgencyId(),
communityScoreDTOS.get(i).getPid(), communityScoreDTOS.get(i).getAgencyName(), monthlyDTO);
monthlyFormDTOList.add(monthlyDTO);
}
@ -436,6 +444,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
} else {
// 赋值 党建能力、治理能力、服务能力
monthlyFormDTO = this.setValueAbilityMonthlyFor(communityScore.getValue().get(i).getIndexCode(),
communityScore.getValue().get(i).getWeight(),
communityScore.getValue().get(i).getScore(),
monthlyFormDTO);
}
@ -487,6 +496,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
} else {
mismatchDeptList = screenCustomerDeptDao.selectListMismatchDeptInfo(customerId, null);
}
if (!CollectionUtils.isEmpty(mismatchDeptList)){
// 如果进行不匹配查询,查到了其他部门信息,一律赋默认值
this.insertIndexMonthlyByDeptDefaultScore(monthId, customerId, mismatchDeptList);
@ -517,8 +527,12 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
monthlyDTO.setPartyDevAblity(zero);
monthlyDTO.setServiceAblity(zero);
monthlyDTO.setGovernAblity(zero);
// 9.12 增加权重
monthlyDTO.setPartyDevWeight(zero);
monthlyDTO.setServiceAblityWeight(zero);
monthlyDTO.setGovernAblityWeight(zero);
// 补充表中其他字段
monthlyDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, deptScoreDTOS.get(i).getDeptId(),
monthlyDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.DEPARTMENT, deptScoreDTOS.get(i).getDeptId(),
deptScoreDTOS.get(i).getParentAgencyId(), deptScoreDTOS.get(i).getDeptName(), monthlyDTO);
monthlyFormDTOList.add(monthlyDTO);
}
@ -547,8 +561,12 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
for ( int i = 0; i < deptScore.getValue().size(); i++){
// 区直街道的总分 就是 治理能力
monthlyFormDTO.setIndexTotal(deptScore.getValue().get(i).getScore());
// 多余的权重,赋0
monthlyFormDTO.setPartyDevWeight(new BigDecimal(NumConstant.ZERO));
monthlyFormDTO.setServiceAblityWeight(new BigDecimal(NumConstant.ZERO));
// 赋值 治理能力
monthlyFormDTO = this.setValueAbilityMonthlyFor(deptScore.getValue().get(i).getIndexCode(),
deptScore.getValue().get(i).getWeight(),
deptScore.getValue().get(i).getScore(),
monthlyFormDTO);
}
@ -592,10 +610,11 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
for (int i = NumConstant.ZERO; i < indexAgencyIds.size(); i++){
agencyIds[i] = indexAgencyIds.get(i);
}
mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcAgencyInfo(customerId, agencyIds);
mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcStreetAndDistrictAgencyInfo(customerId, agencyIds);
} else {
mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcAgencyInfo(customerId, null);
mismatchAgencyList = screenCustomerAgencyDao.selectListMismatcStreetAndDistrictAgencyInfo(customerId, null);
}
if (!CollectionUtils.isEmpty(mismatchAgencyList)){
this.insertIndexMonthlyByAgencyDefaultScore(monthId, customerId, mismatchAgencyList);
}
@ -632,6 +651,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
} else {
// 赋值 党建能力、治理能力、服务能力
monthlyFormDTO = this.setValueAbilityMonthlyFor(agencyScore.getValue().get(i).getIndexCode(),
agencyScore.getValue().get(i).getWeight(),
agencyScore.getValue().get(i).getScore(),
monthlyFormDTO);
}
@ -685,23 +705,28 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
/**
* 赋实际值 党建能力治理能力服务能力
* @param IndexCode 组织类别
* @param weight 权重同一组权重总和=1
* @param Score 分数
* @param monthlyFormDTO 待保存的数据
* @return com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO
* @Author zhangyong
* @Date 09:26 2020-09-04
**/
private IndexDataMonthlyFormDTO setValueAbilityMonthlyFor(String IndexCode, BigDecimal Score, IndexDataMonthlyFormDTO monthlyFormDTO){
private IndexDataMonthlyFormDTO setValueAbilityMonthlyFor(String IndexCode, BigDecimal weight, BigDecimal Score, IndexDataMonthlyFormDTO monthlyFormDTO){
// 赋实际值
if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(IndexCode)){
// 党建能力
monthlyFormDTO.setPartyDevAblity(Score);
// 9.12 增加权重
monthlyFormDTO.setPartyDevWeight(weight);
} else if (IndexCodeEnum.ZHI_LI_NENG_LI.getCode().equals(IndexCode)){
// 治理能力
monthlyFormDTO.setGovernAblity(Score);
monthlyFormDTO.setGovernAblityWeight(weight);
} else if (IndexCodeEnum.FU_WU_NENG_LI.getCode().equals(IndexCode)){
// 服务能力
monthlyFormDTO.setServiceAblity(Score);
monthlyFormDTO.setServiceAblityWeight(weight);
}
return monthlyFormDTO;
}
@ -733,7 +758,9 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
* @Date 22:06 2020-09-04
**/
private void insertIndexDataYear(String monthId, String customerId){
List<IndexDataMonthlyFormDTO> monthlyFormList = screenIndexDataMonthlyDao.selectListIndexDataMonthlyByYear(customerId, getYearStr(monthId), getMonthStr(monthId));
// 查询今年,上报了几个月的指数统计
Integer monthCount = screenIndexDataMonthlyDao.selectCountIndexDataMonthly(customerId, getYearStr(monthId));
List<IndexDataMonthlyFormDTO> monthlyFormList = screenIndexDataMonthlyDao.selectListIndexDataMonthlyByYear(customerId, getYearStr(monthId), monthCount);
if (monthlyFormList.size() > NumConstant.ZERO){
int deleteNum;
do {
@ -768,4 +795,21 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService {
private String getMonthStr(String monthId){
return monthId.substring(NumConstant.FOUR, NumConstant.SIX);
}
/**
* 批量删除 指数-指数数据(每月数值) 表数据
*
* @param customerId
* @param monthId 202008
* @param orgType 组织类别 agency组织部门department网格grid
* @return void
* @Author zhangyong
* @Date 09:55 2020-09-12
**/
private void batchDelIndexDataMonthly( String customerId, String monthId, String orgType){
int deleteNum;
do {
deleteNum = screenIndexDataMonthlyDao.deleteIndexDataMonthlyByOrgType(customerId, monthId, orgType);
} while (deleteNum > NumConstant.ZERO);
}
}

13
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/IndexGroupDetailService.java

@ -20,6 +20,7 @@ package com.epmet.service.evaluationindex.screen;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity;
import java.math.BigDecimal;
import java.util.List;
/**
@ -31,8 +32,18 @@ import java.util.List;
public interface IndexGroupDetailService extends BaseService<IndexGroupDetailEntity> {
/**
* desc根据all_parent_index_code 获取指标明细
*
* @param customerId
* @param indexCode
*/
List<IndexGroupDetailEntity> getDetailListByParentCode(String customerId,String... indexCode);
List<IndexGroupDetailEntity> getDetailListByParentCode(String customerId, String... indexCode);
/**
* desc根据all_parent_index_code 获取指标权重
* 如果获取不到 返回-1 表明数据有误
*
* @param customerId
* @param allPathIndexCode
*/
BigDecimal getWeightByAllPathIndexCode(String customerId, String allPathIndexCode);
}

38
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/IndexGroupDetailServiceImpl.java

@ -19,15 +19,23 @@ package com.epmet.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.evaluationindex.screen.IndexGroupDetailDao;
import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity;
import com.epmet.redis.IndexCalRedis;
import com.epmet.service.evaluationindex.screen.IndexGroupDetailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 客户指标详情
@ -35,20 +43,40 @@ import java.util.List;
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-19
*/
@Slf4j
@Service
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public class IndexGroupDetailServiceImpl extends BaseServiceImpl<IndexGroupDetailDao, IndexGroupDetailEntity> implements IndexGroupDetailService {
@Autowired
private IndexCalRedis indexCalRedis;
@Override
public List<IndexGroupDetailEntity> getDetailListByParentCode(String customerId,String... indexCode) {
if (indexCode == null || indexCode.length == 0){
public List<IndexGroupDetailEntity> getDetailListByParentCode(String customerId, String... indexCode) {
if (indexCode == null || indexCode.length == 0) {
throw new RenException("参数错误");
}
StringBuilder sb = new StringBuilder();
for (String code:indexCode){
for (String code : indexCode) {
sb.append(code).append(StrConstant.COLON);
}
return baseDao.getDetailListByParentCode(customerId,sb.deleteCharAt(sb.length()-1).toString());
return baseDao.getDetailListByParentCode(customerId, sb.deleteCharAt(sb.length() - 1).toString());
}
@Override
public BigDecimal getWeightByAllPathIndexCode(String customerId, String allPathIndexCode) {
Map<String, BigDecimal> indexCodeFiledReMap = indexCalRedis.getIndexCodeWeightMap(customerId);
if (CollectionUtils.isEmpty(indexCodeFiledReMap)) {
List<IndexGroupDetailEntity> allData = baseDao.getAllIndexWeightList(customerId);
if (CollectionUtils.isEmpty(allData)) {
log.warn("getAllIndexWeightList return empty");
return null;
}
indexCodeFiledReMap = allData.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, o -> o.getWeight()));
indexCalRedis.setIndexCodeWeightMap(customerId, indexCodeFiledReMap);
}
BigDecimal weight = indexCodeFiledReMap.get(allPathIndexCode);
return weight == null ? new BigDecimal(NumConstant.ONE_NEG) : weight;
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java

@ -67,7 +67,7 @@ public class BatchScoreCalculator {
result.setDetails(new ArrayList<>());
scoreCountOfSamples.put(sampleId, result);
}
IndexScoreVo sampleScore = new IndexScoreVo(idx.getIndexId(), idx.getAllParentIndexCode(), score);
IndexScoreVo sampleScore = new IndexScoreVo(idx.getIndexId(), idx.getAllParentIndexCode(), score, idx.getWeight());
result.getDetails().add(sampleScore);
result.setTotalScore(result.getTotalScore().add(score).setScale(6, RoundingMode.HALF_UP));
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexScoreVo.java

@ -26,6 +26,10 @@ public class IndexScoreVo implements Serializable {
* 分值
*/
private BigDecimal score;
/**
* 该指标的权重
*/
private BigDecimal weight;
}

687
epmet-module/data-statistical/data-statistical-server/src/main/resources/db/migration/V0.0.3__add_index_table.sql

@ -0,0 +1,687 @@
# /*
# Navicat Premium Data Transfer
#
# Source Server : 亿联开发
# Source Server Type : MySQL
# Source Server Version : 50728
# Source Host : 192.168.1.130:3306
# Source Schema : epmet_evaluation_index
#
# Target Server Type : MySQL
# Target Server Version : 50728
# File Encoding : 65001
#
# Date: 12/09/2020 09:10:38
# */
#
# SET NAMES utf8mb4;
# SET FOREIGN_KEY_CHECKS = 0;
#
# -- ----------------------------
# -- Table structure for fact_index_agency_score
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_agency_score`;
# CREATE TABLE `fact_index_agency_score` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id(eg:社区或者街道id)',
# `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '上级组织id',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM',
# `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;street:街道',
# `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0',
# `SCORE` decimal(10,6) NOT NULL COMMENT '分值',
# `INDEX_CODE` varchar(255) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan',
# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开',
# `DEL_FLAG` int(1) NOT NULL COMMENT '1删除,默认0',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间'
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='区/街道相关分数表 ';
#
# -- ----------------------------
# -- Table structure for fact_index_agency_sub_score
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_agency_sub_score`;
# CREATE TABLE `fact_index_agency_sub_score` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id(eg:社区或者街道id)',
# `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '上级组织id',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM',
# `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;street:街道',
# `SCORE` decimal(10,6) NOT NULL COMMENT '分值',
# `INDEX_CODE` varchar(64) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan',
# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开',
# `DEL_FLAG` int(1) NOT NULL COMMENT '1删除,默认0',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='区/街道相关分数表 ';
#
# -- ----------------------------
# -- Table structure for fact_index_community_score
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_community_score`;
# CREATE TABLE `fact_index_community_score` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id',
# `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '社区上一级组织id',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM',
# `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0',
# `SCORE` decimal(10,6) NOT NULL COMMENT '分值',
# `INDEX_CODE` varchar(255) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;社区相关:shequxiangguan',
# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开',
# `DEL_FLAG` int(1) NOT NULL,
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='社区相关分数表 ';
#
# -- ----------------------------
# -- Table structure for fact_index_community_sub_score
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_community_sub_score`;
# CREATE TABLE `fact_index_community_sub_score` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织id',
# `PARENT_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '社区上一级组织id',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM',
# `SCORE` decimal(10,6) NOT NULL COMMENT '分值',
# `INDEX_CODE` varchar(64) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;社区相关:shequxiangguan',
# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开',
# `DEL_FLAG` int(1) NOT NULL,
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='社区相关分数表 ';
#
# -- ----------------------------
# -- Table structure for fact_index_cpc_score
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_cpc_score`;
# CREATE TABLE `fact_index_cpc_score` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的机关Id',
# `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM',
# `USER_ID` varchar(64) NOT NULL COMMENT '用户id',
# `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是 默认0',
# `SCORE` decimal(10,6) NOT NULL COMMENT '分值',
# `INDEX_CODE` varchar(64) NOT NULL COMMENT '参与议事分值:canyuyishi;\r\n党务活动分值:dangwuhuodong;\r\n联系群众分值:lianxiqunzhong;\r\n党建能力分值:dangjiannengli',
# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开',
# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='党员相关分值';
#
# -- ----------------------------
# -- Table structure for fact_index_cpc_sub_score
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_cpc_sub_score`;
# CREATE TABLE `fact_index_cpc_sub_score` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的机关Id',
# `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM',
# `USER_ID` varchar(64) NOT NULL COMMENT '用户id',
# `SCORE` decimal(10,6) NOT NULL COMMENT '分值',
# `INDEX_CODE` varchar(64) NOT NULL COMMENT '参与议事分值:canyuyishi;\r\n党务活动分值:dangwuhuodong;\r\n联系群众分值:lianxiqunzhong;\r\n党建能力分值:dangjiannengli',
# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开',
# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='党员相关分值';
#
# -- ----------------------------
# -- Table structure for fact_index_dept_score
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_dept_score`;
# CREATE TABLE `fact_index_dept_score` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `DEPT_ID` varchar(64) NOT NULL COMMENT '部门id',
# `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '部门所属的机关Id',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM',
# `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0',
# `SCORE` decimal(10,6) NOT NULL COMMENT '分值',
# `INDEX_CODE` varchar(64) NOT NULL COMMENT '治理能力:zhilinengli;区直部门:quzhibumen',
# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开',
# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`)
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='区直部门分值表';
#
# -- ----------------------------
# -- Table structure for fact_index_dept_sub_score
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_dept_sub_score`;
# CREATE TABLE `fact_index_dept_sub_score` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `DEPT_ID` varchar(64) NOT NULL COMMENT '部门id',
# `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '部门所属的机关Id',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM',
# `SCORE` decimal(10,6) NOT NULL COMMENT '分值',
# `INDEX_CODE` varchar(64) NOT NULL COMMENT '治理能力:zhilinengli;',
# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开',
# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`)
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='区直部门分值表';
#
# -- ----------------------------
# -- Table structure for fact_index_govrn_ablity_dept_monthly
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_govrn_ablity_dept_monthly`;
# CREATE TABLE `fact_index_govrn_ablity_dept_monthly` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `AGENCY_ID` varchar(64) NOT NULL COMMENT '部门所属机关Id',
# `DEPT_ID` varchar(64) NOT NULL COMMENT '部门id',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id:yyyy',
# `TRANSFERED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '区直部门被吹哨次数',
# `CLOSED_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '区直部门办结项目数',
# `RESP_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '区直部门项目响应度 所有被吹哨后的滞留时间除以项目数',
# `HANDLE_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '区直部门办结项目的处理效率',
# `CLOSED_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '区直部门项目办结率',
# `SATISFACTION_RATIO` decimal(10,6) NOT NULL COMMENT '办结项目满意度',
# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='治理能力-区直部门相关数据 ';
#
# -- ----------------------------
# -- Table structure for fact_index_govrn_ablity_grid_monthly
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_govrn_ablity_grid_monthly`;
# CREATE TABLE `fact_index_govrn_ablity_grid_monthly` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属机关Id',
# `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id:yyyy',
# `ISSUE_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '网格总议题数',
# `AVG_ISSUE_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格人均议题数目',
# `ISSUE_TO_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '网格议题转项目率',
# `PROJECT_TOTAL` int(11) NOT NULL DEFAULT '0' COMMENT '网格总项目数',
# `SELF_SOLVE_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格自治项目数 统计期网格自身内办结的项目数目',
# `RESOLVE_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格办结项目数 统计期内办结的项目数目',
# `TRANSFER_RIGHT_RATIO` decimal(10,6) NOT NULL COMMENT '网格吹哨部门准确率',
# `SATISFACTION_RATIO` decimal(10,6) NOT NULL COMMENT '网格内解决的项目的满意度',
# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='治理能力-网格相关事实表 ';
#
# -- ----------------------------
# -- Table structure for fact_index_govrn_ablity_org_monthly
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_govrn_ablity_org_monthly`;
# CREATE TABLE `fact_index_govrn_ablity_org_monthly` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `AGENCY_ID` varchar(64) NOT NULL COMMENT '机关Id',
# `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id,如果是根级组织,此列为0',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id:yyyy',
# `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;community:社区;street:街道',
# `TRANSFERED_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '被吹哨次数',
# `CLOSED_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '办结项目数',
# `RESP_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '项目响应度 所有被吹哨后的滞留时间除以项目数',
# `OVERDUE_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '社区超期项目率,dataTyp=commnuity有值',
# `CLOSED_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '办结项目率',
# `SATISFACTION_RATIO` decimal(10,6) NOT NULL COMMENT '办结项目满意度',
# `HANDLE_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '街道办结项目的处理效率, data_type=street时有值',
# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='治理能力-街道及社区相关数据 ';
#
# -- ----------------------------
# -- Table structure for fact_index_grid_score
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_grid_score`;
# CREATE TABLE `fact_index_grid_score` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id',
# `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '网格所属的机关Id',
# `ALL_PARENT_IDS` varchar(512) DEFAULT NULL COMMENT '所有上级ID,用英文逗号分开',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM',
# `IS_TOTAL` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:总分;0不是;默认0',
# `SCORE` decimal(10,6) NOT NULL COMMENT '分值',
# `INDEX_CODE` varchar(255) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;网格相关:wanggexiangguan',
# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开',
# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间'
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='网格相关分值记录表';
#
# -- ----------------------------
# -- Table structure for fact_index_grid_sub_score
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_grid_sub_score`;
# CREATE TABLE `fact_index_grid_sub_score` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id',
# `AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '网格所属的机关Id',
# `ALL_PARENT_IDS` varchar(512) DEFAULT NULL COMMENT '所有上级ID,用英文逗号分开',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年度ID: yyyy',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyyMM',
# `SCORE` decimal(10,6) NOT NULL COMMENT '分值',
# `INDEX_CODE` varchar(64) NOT NULL COMMENT '党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;网格相关:wanggexiangguan',
# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开',
# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`)
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='网格相关分值记录表';
#
# -- ----------------------------
# -- Table structure for fact_index_party_ablity_cpc_monthly
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_party_ablity_cpc_monthly`;
# CREATE TABLE `fact_index_party_ablity_cpc_monthly` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属的机关Id',
# `PARENT_ID` varchar(64) DEFAULT NULL COMMENT 'agency_id的上级组织Id',
# `GRID_ID` varchar(64) NOT NULL COMMENT '党员所属的网格Id',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id: yyyMM',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id: yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id : yyyy',
# `USER_ID` varchar(64) NOT NULL COMMENT '用户id',
# `CREATE_TOPIC_COUNT` int(11) NOT NULL COMMENT '党员提出的话题数',
# `JOIN_TOPIC_COUNT` int(11) NOT NULL COMMENT '党员参与话题数(支持,反对,评论,浏览)',
# `SHIFT_ISSUE_COUNT` int(11) NOT NULL COMMENT '党员提出的话题转议题数',
# `SHIFT_PROJECT_COUNT` int(11) NOT NULL COMMENT '党员提出的议题转项目数',
# `JOIN_THREE_MEETS_COUNT` int(11) NOT NULL COMMENT '参加三会一课次数',
# `GROUP_USER_COUNT` int(11) NOT NULL COMMENT '党员自建群群众人数',
# `GROUP_ACTIVE_USER_COUNT` int(11) NOT NULL COMMENT '党员自建群活跃群众人数(08-24)',
# `GROUP_TOPIC_COUNT` int(11) NOT NULL COMMENT '党员自建群活跃度——话题数',
# `TOPIC_TO_ISSUE_RATIO` decimal(10,6) NOT NULL COMMENT '自建群活跃度——议题转项目率',
# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='党建能力-党员相关的事实表 ';
#
# -- ----------------------------
# -- Table structure for fact_index_party_ablity_grid_monthly
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_party_ablity_grid_monthly`;
# CREATE TABLE `fact_index_party_ablity_grid_monthly` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `AGENCY_ID` varchar(64) NOT NULL COMMENT '机关Id',
# `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年Idyyyy',
# `USER_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格群众用户数',
# `PARTY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格党员用户数',
# `ACTIVE_USER_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格活跃群众用户数',
# `ACTIVE_PARTY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格活跃党员用户数',
# `PARTY_AVG_TOPIC_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格党员人均提出话题数',
# `USER_AVG_TOPIC_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格群众人均提出话题数',
# `PARTY_AVG_SHIFT_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格党员人均提出的议题转项目数',
# `USER_AVG_SHIFT_PROJECT_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格群众人均提出的议题转项目数',
# `CREATE_GROUP_PARTY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '建群党员数(累计值) 去重',
# `PUBLISH_ARTICLE_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格发文数',
# `ISSUE_TO_PROJECT_RATIO` decimal(10,6) NOT NULL COMMENT '网格议题转项目率',
# `CREATE_THREE_MEETS_COUNT` int(11) NOT NULL COMMENT '组织三会一课次数',
# `JOIN_THREE_MEETS_COUNT` int(11) NOT NULL COMMENT '党员参加三会一课人次',
# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='党建能力-网格相关事实表 ';
#
# -- ----------------------------
# -- Table structure for fact_index_party_ablity_org_monthly
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_party_ablity_org_monthly`;
# CREATE TABLE `fact_index_party_ablity_org_monthly` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `AGENCY_ID` varchar(64) NOT NULL COMMENT '机关Id',
# `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id',
# `YEAR_ID` varchar(32) NOT NULL COMMENT '年Id',
# `PUBLISH_ARTICLE_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT 'XXX名义发文数',
# `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型district :全区;community:社区;street:街道',
# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='党建能力-街道及社区相关事实表 ';
#
# -- ----------------------------
# -- Table structure for fact_index_service_ablity_grid_monthly
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_service_ablity_grid_monthly`;
# CREATE TABLE `fact_index_service_ablity_grid_monthly` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `AGENCY_ID` varchar(64) NOT NULL COMMENT '网格所属组织Id',
# `GRID_ID` varchar(64) NOT NULL COMMENT '网格Id',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4',
# `YEAR_ID` varchar(32) NOT NULL DEFAULT '0' COMMENT '年Id: yyyy',
# `ACTIVITY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '网格活动组织次数 爱心活动',
# `VOLUNTEER_RATIO` decimal(10,6) NOT NULL COMMENT '网格志愿者占比',
# `PARTY_VOLUNTEER_RATIO` decimal(10,6) NOT NULL COMMENT '网格党员志愿者率',
# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务能力-网格相关事实表';
#
# -- ----------------------------
# -- Table structure for fact_index_service_ablity_org_monthly
# -- ----------------------------
# DROP TABLE IF EXISTS `fact_index_service_ablity_org_monthly`;
# CREATE TABLE `fact_index_service_ablity_org_monthly` (
# `ID` varchar(64) NOT NULL COMMENT 'ID 主键',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id',
# `AGENCY_ID` varchar(64) NOT NULL COMMENT '组织Id',
# `PARENT_ID` varchar(64) NOT NULL COMMENT '上级组织Id',
# `MONTH_ID` varchar(32) NOT NULL COMMENT '月维度Id:yyyyMM',
# `QUARTER_ID` varchar(32) NOT NULL COMMENT '季度Id:yyyyQ1,yyyyQ2,yyyyQ3,yyyyQ4',
# `YEAR_ID` varchar(32) NOT NULL DEFAULT '0' COMMENT '年Id:yyyy',
# `ACTIVITY_COUNT` int(11) NOT NULL DEFAULT '0' COMMENT '社区/街道活动组织次数 爱心活动',
# `DATA_TYPE` varchar(100) NOT NULL DEFAULT '' COMMENT '数据类型 district :全区;community:社区;street:街道',
# `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除;1已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务能力-组织(街道|社区|全区)相关事实表 ';
#
# -- ----------------------------
# -- Table structure for index_dict
# -- ----------------------------
# DROP TABLE IF EXISTS `index_dict`;
# CREATE TABLE `index_dict` (
# `ID` varchar(64) NOT NULL COMMENT '主键id',
# `INDEX_NAME` varchar(255) NOT NULL COMMENT '指标名',
# `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code',
# `INDEX_DESC` varchar(1024) DEFAULT NULL COMMENT '指标描述',
# `LEVEL` varchar(1) NOT NULL COMMENT '指标级别(1,2,3,4,5)',
# `CORRELATION` varchar(32) DEFAULT NULL COMMENT '正相关:positive;负相关:negative',
# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='评价指标字典';
#
# -- ----------------------------
# -- Table structure for index_group
# -- ----------------------------
# DROP TABLE IF EXISTS `index_group`;
# CREATE TABLE `index_group` (
# `ID` varchar(64) NOT NULL COMMENT '主键id',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
# `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id',
# `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code',
# `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled',
# `PARENT_INDEX_GROUP_ID` varchar(64) DEFAULT NULL COMMENT '当前指标关联的上一级指标分组,如果没有上一级,则为0',
# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户指标分组';
#
# -- ----------------------------
# -- Table structure for index_group_detail
# -- ----------------------------
# DROP TABLE IF EXISTS `index_group_detail`;
# CREATE TABLE `index_group_detail` (
# `ID` varchar(64) NOT NULL COMMENT '主键id',
# `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
# `INDEX_GROUP_ID` varchar(64) NOT NULL COMMENT 'index_group.id',
# `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id',
# `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code',
# `WEIGHT` decimal(5,4) NOT NULL COMMENT '权重(同一组权重总和=1)',
# `THRESHOLD` decimal(16,4) NOT NULL DEFAULT '-1.0000' COMMENT '计算阈值,-1:没有阈值;如果是百分数则 为0.00几;如果为数据则直接填数值',
# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开',
# `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled',
# `CORRELATION` varchar(32) DEFAULT NULL COMMENT '正相关:positive;负相关:negative',
# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户指标详情';
#
# -- ----------------------------
# -- Table structure for index_group_detail_template
# -- ----------------------------
# DROP TABLE IF EXISTS `index_group_detail_template`;
# CREATE TABLE `index_group_detail_template` (
# `ID` varchar(64) NOT NULL COMMENT '主键id',
# `INDEX_GROUP_ID` varchar(64) NOT NULL COMMENT 'index_group_template.id',
# `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id',
# `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code',
# `WEIGHT` decimal(5,4) NOT NULL COMMENT '权重(同一组权重总和=1)',
# `THRESHOLD` decimal(16,4) NOT NULL DEFAULT '-1.0000' COMMENT '计算阈值,-1:没有阈值;如果是百分数则 为0.00几;如果为数据则直接填数值',
# `ALL_PARENT_INDEX_CODE` varchar(256) NOT NULL COMMENT '所有指标code拼接的字符串 冒号隔开',
# `CORRELATION` varchar(32) DEFAULT NULL COMMENT '正相关:positive;负相关:negative',
# `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled',
# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户指标详情';
#
# -- ----------------------------
# -- Table structure for index_group_template
# -- ----------------------------
# DROP TABLE IF EXISTS `index_group_template`;
# CREATE TABLE `index_group_template` (
# `ID` varchar(64) NOT NULL COMMENT '主键id',
# `INDEX_ID` varchar(64) NOT NULL COMMENT '指标id',
# `INDEX_CODE` varchar(64) NOT NULL COMMENT '指标code',
# `STATUS` varchar(32) NOT NULL DEFAULT 'enable' COMMENT '是否启用:启用:enable 禁用:disabled',
# `PARENT_INDEX_GROUP_ID` varchar(64) DEFAULT NULL COMMENT '当前指标关联的上一级指标分组,如果没有上一级,则为0',
# `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`)
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户指标分组';
#
# -- ----------------------------
# -- Table structure for index_code_field_re
# -- ----------------------------
# DROP TABLE IF EXISTS `index_code_field_re`;
# CREATE TABLE `index_code_field_re` (
# `ID` varchar(64) NOT NULL COMMENT '主键id',
# `INDEX_CODE` varchar(256) NOT NULL COMMENT '指标code',
# `FIELD_ID` varchar(32) DEFAULT '' COMMENT '是否启用:启用:enable 禁用:disabled',
# `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除',
# `REVISION` int(11) NOT NULL COMMENT '乐观锁',
# `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
# `CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
# `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
# `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
# PRIMARY KEY (`ID`) USING BTREE,
# UNIQUE KEY `unx_index_code` (`INDEX_CODE`)
# ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='指标code和原始数据对应的字段关系表';
#
# -- ----------------------------
# -- Records of index_code_field_re
# -- ----------------------------
# BEGIN;
# INSERT INTO `index_code_field_re` VALUES ('1', 'dangyuantichuhts', 'CREATE_TOPIC_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('10', 'wanggequnzhongyhs', 'USER_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13');
# INSERT INTO `index_code_field_re` VALUES ('11', 'wanggedangyuanyhs', 'PARTY_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13');
# INSERT INTO `index_code_field_re` VALUES ('12', 'wanggehuoyueqzyhs', 'ACTIVE_USER_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13');
# INSERT INTO `index_code_field_re` VALUES ('13', 'wanggehuoyuedyyhs', 'ACTIVE_PARTY_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13');
# INSERT INTO `index_code_field_re` VALUES ('14', 'wanggedangyuanrjtchts', 'PARTY_AVG_TOPIC_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13');
# INSERT INTO `index_code_field_re` VALUES ('15', 'wanggequnzhongrjtchts', 'USER_AVG_TOPIC_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13');
# INSERT INTO `index_code_field_re` VALUES ('16', 'wanggedangyuanrjtcdytzxms', 'PARTY_AVG_SHIFT_PROJECT_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13');
# INSERT INTO `index_code_field_re` VALUES ('17', 'wanggequnzhongrjtcdytzxms', 'USER_AVG_SHIFT_PROJECT_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13');
# INSERT INTO `index_code_field_re` VALUES ('18', 'jianqundangyuans', 'CREATE_GROUP_PARTY_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13');
# INSERT INTO `index_code_field_re` VALUES ('19', 'zuzhineidangydlxqznlkpfpjz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('2', 'dangyuancanyuhtszcfdplll', 'JOIN_TOPIC_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('20', 'wanggedifawsl', 'PUBLISH_ARTICLE_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13');
# INSERT INTO `index_code_field_re` VALUES ('21', 'wanggeyitizxml', 'ISSUE_TO_PROJECT_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45');
# INSERT INTO `index_code_field_re` VALUES ('22', 'zuzhisanhykcs', 'CREATE_THREE_MEETS_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13');
# INSERT INTO `index_code_field_re` VALUES ('23', 'dangyuancanjiashykrc', 'JOIN_THREE_MEETS_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:05:13');
# INSERT INTO `index_code_field_re` VALUES ('24', 'xiashusuoyouwgddjnlpjz', 'PARTY_ABLITY_SCORE', '0', 0, '', '0000-00-00 00:00:00', 'z', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('25', 'shequmingyifwsl', 'PUBLISH_ARTICLE_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('26', 'jiedaoxiashusysqdjnlhzpyz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('27', 'jiedaomingyifwsl', 'PUBLISH_ARTICLE_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('28', 'quxiajijieddjnlhzpyz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('29', 'qumingyifawsl', 'PUBLISH_ARTICLE_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('3', 'dangyuantichudhtzyts', 'SHIFT_ISSUE_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('30', 'zuzhineidangydcyysnlkpfpjz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('31', 'wanggezongyitsm', 'ISSUE_TOTAL', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45');
# INSERT INTO `index_code_field_re` VALUES ('32', 'wanggerenjunytsm', 'AVG_ISSUE_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45');
# INSERT INTO `index_code_field_re` VALUES ('33', 'wanggezongxiangms', 'PROJECT_TOTAL', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45');
# INSERT INTO `index_code_field_re` VALUES ('34', 'wanggezizhixms', 'SELF_SOLVE_PROJECT_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45');
# INSERT INTO `index_code_field_re` VALUES ('35', 'wanggebanjiexms', 'RESOLVE_PROJECT_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45');
# INSERT INTO `index_code_field_re` VALUES ('36', 'wanggechuishaobmzql', 'TRANSFER_RIGHT_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45');
# INSERT INTO `index_code_field_re` VALUES ('37', 'wanggeneijiejdxmdmyd', 'SATISFACTION_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:22:45');
# INSERT INTO `index_code_field_re` VALUES ('38', 'shequxiashusywgzlnlhzpyz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('39', 'shequbeichuiscs', 'TRANSFERED_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('4', 'dangyuantichudytzxms', 'SHIFT_PROJECT_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('40', 'shequbanjiexms', 'CLOSED_PROJECT_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('41', 'shequxiangmuxyd', 'RESP_PROJECT_RATIO', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('42', 'shequchaoqixml', 'OVERDUE_PROJECT_RATIO', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('43', 'shequbanjiexml', 'CLOSED_PROJECT_RATIO', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('44', 'shequbanjiexmmyd', 'SATISFACTION_RATIO', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('45', 'jiedaoxiashusysqzlnlhz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('46', 'jiedaobeichuiscs', 'TRANSFERED_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('47', 'jiedaobanjiexms', 'CLOSED_PROJECT_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('48', 'jiedaoxiangmuxyd', 'RESP_PROJECT_RATIO', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('49', 'jiedaobanjiexmdclxl', 'HANDLE_PROJECT_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('5', 'canjiasanhykcs', 'JOIN_THREE_MEETS_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('50', 'jiedaoxiangmubjl', 'CLOSED_PROJECT_RATIO', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('51', 'jiedaojixiangmumyd', 'SATISFACTION_RATIO', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('52', 'quzhibumenbcscs', 'TRANSFERED_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-09-03 17:09:31');
# INSERT INTO `index_code_field_re` VALUES ('53', 'quzhibumenbjxms', 'CLOSED_PROJECT_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-09-03 17:09:31');
# INSERT INTO `index_code_field_re` VALUES ('54', 'quzhibumenxmxyd', 'RESP_PROJECT_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-09-03 17:09:31');
# INSERT INTO `index_code_field_re` VALUES ('55', 'quzhibumenbjxmdclxl', 'HANDLE_PROJECT_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-09-03 17:09:31');
# INSERT INTO `index_code_field_re` VALUES ('56', 'quzhibumenxmbjl', 'CLOSED_PROJECT_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-09-03 17:09:31');
# INSERT INTO `index_code_field_re` VALUES ('57', 'quzhibumenxmmyd', 'SATISFACTION_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-09-03 17:09:31');
# INSERT INTO `index_code_field_re` VALUES ('58', 'suoyoujiedaozlnlpjz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('59', 'suoyouzhizhubmzlnlpjz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('6', 'dangyuanzijianqqzrs', 'GROUP_USER_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('60', 'wanggehuodongzzcs', 'ACTIVITY_COUNT', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:15:06');
# INSERT INTO `index_code_field_re` VALUES ('61', 'wanggezhiyuanzzb', 'VOLUNTEER_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:15:06');
# INSERT INTO `index_code_field_re` VALUES ('62', 'wanggedangyuanzyzl', 'PARTY_VOLUNTEER_RATIO', '0', 0, '', '0000-00-00 00:00:00', 'yinzuomei', '2020-08-30 18:15:06');
# INSERT INTO `index_code_field_re` VALUES ('63', 'shequxiajisywgfwnldfpjz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('64', 'shequhuodongzzcs', 'ACTIVITY_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('65', 'jiedaoxiashusqfwnldfpyz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('66', 'jiedaohuodongzzcs', 'ACTIVITY_COUNT', '0', 0, 'zxc', '0000-00-00 00:00:00', 'zxc', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('67', 'quxiazhujiedfwnlhzpyz', '1', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('68', 'jiedaojixiangmmyd', 'SATISFACTION_RATIO', '0', 0, 'zxc', '2020-09-04 17:50:33', 'zxc', '2020-09-04 17:50:39');
# INSERT INTO `index_code_field_re` VALUES ('7', 'dangyuanzijianqhyqzrs', 'GROUP_ACTIVE_USER_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('8', 'dangyuanzijianqhydhts', 'GROUP_TOPIC_COUNT', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# INSERT INTO `index_code_field_re` VALUES ('9', 'zijianqunhuoydytzxml', 'TOPIC_TO_ISSUE_RATIO', '0', 0, '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00');
# COMMIT;
#
# SET FOREIGN_KEY_CHECKS = 1;
select 1;

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml

@ -139,7 +139,7 @@
</appender>
<!-- 开发、测试环境 -->
<springProfile name="dev,test">
<springProfile name="dev,test,local">
<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="INFO"/>
<logger name="com.epmet.dao" level="DEBUG"/>

53
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml

@ -5,7 +5,8 @@
<!-- 【街道】中间表插入 -->
<insert id="insertStreetRecord">
INSERT INTO fact_index_agency_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, IS_TOTAL, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
INSERT INTO fact_index_agency_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, IS_TOTAL, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE,
WEIGHT,DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
VALUES
<foreach collection="lists" item="item" separator=",">
(
@ -21,6 +22,7 @@
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},
#{item.weight},
#{item.delFlag},
#{item.revision},
#{item.createdBy},
@ -53,7 +55,8 @@
MONTH_ID monthId,
IS_TOTAL isTotal,
SCORE score,
INDEX_CODE indexCode
INDEX_CODE indexCode,
WEIGHT weight
FROM
fact_index_agency_score
WHERE
@ -107,52 +110,6 @@
GROUP BY fics.parent_agency_id
</select>
<insert id="batchInsertAgencyScoreData" parameterType="map">
insert into fact_index_agency_score
(
ID,
CUSTOMER_ID,
AGENCY_ID,
PARENT_AGENCY_ID,
YEAR_ID,
QUARTER_ID,
MONTH_ID,
DATA_TYPE,
IS_TOTAL,
SCORE,
INDEX_CODE,
DEL_FLAG,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{customerId},
#{item.agencyId},
#{item.parentAgencyId},
#{item.yearId},
#{item.quarterId},
#{item.monthId},
#{item.dataType},
#{item.isTotal},
#{item.score},
#{item.indexCode},
0,
0,
'APP_USER',
now(),
'APP_USER',
now()
)
</foreach>
</insert>
<select id="selectListAgencyId" resultType="String">
SELECT

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencySubScoreDao.xml

@ -5,7 +5,8 @@
<!-- 【街道】中间表插入 -->
<insert id="insertStreetRecord">
INSERT INTO fact_index_agency_sub_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
INSERT INTO fact_index_agency_sub_score (ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, DATA_TYPE, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE,
WEIGHT,DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
VALUES
<foreach collection="lists" item="item" separator=",">
(
@ -20,6 +21,7 @@
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},
#{item.weight},
#{item.delFlag},
#{item.revision},
#{item.createdBy},

49
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml

@ -5,7 +5,8 @@
<!-- 党建能力【社区】中间表插入 -->
<insert id="insertCommunityPartyRecord">
INSERT INTO fact_index_community_score ( ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, IS_TOTAL, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
INSERT INTO fact_index_community_score ( ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, IS_TOTAL, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE,
WEIGHT,DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
VALUES
<foreach collection="lists" item="item" separator=",">
(
@ -20,6 +21,7 @@
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},
#{item.weight},
#{item.delFlag},
#{item.revision},
#{item.createdBy},
@ -96,7 +98,8 @@
MONTH_ID monthId,
IS_TOTAL isTotal,
SCORE score,
INDEX_CODE indexCode
INDEX_CODE indexCode,
WEIGHT weight
FROM
fact_index_community_score
WHERE
@ -106,48 +109,6 @@
ORDER BY AGENCY_ID
</select>
<insert id="batchInsertCommunityScoreData" parameterType="map">
insert into fact_index_community_score
(
ID,
CUSTOMER_ID,
AGENCY_ID,
PARENT_AGENCY_ID,
YEAR_ID,
QUARTER_ID,
MONTH_ID,
IS_TOTAL,
SCORE,
INDEX_CODE,
DEL_FLAG,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{customerId},
#{item.agencyId},
#{item.parentAgencyId},
#{item.yearId},
#{item.quarterId},
#{item.monthId},
#{item.isTotal},
#{item.score},
#{item.indexCode},
0,
0,
'APP_USER',
now(),
'APP_USER',
now()
)
</foreach>
</insert>
<select id="selectListCommunityId" resultType="String">
SELECT

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunitySubScoreDao.xml

@ -5,7 +5,8 @@
<!-- 党建能力【社区】中间表插入 -->
<insert id="insertCommunityPartyRecord">
INSERT INTO fact_index_community_sub_score ( ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
INSERT INTO fact_index_community_sub_score ( ID, CUSTOMER_ID, AGENCY_ID, PARENT_AGENCY_ID, YEAR_ID, QUARTER_ID, MONTH_ID, SCORE, INDEX_CODE,ALL_PARENT_INDEX_CODE,
WEIGHT,DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
VALUES
<foreach collection="lists" item="item" separator=",">
(
@ -19,6 +20,7 @@
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},
#{item.weight},
#{item.delFlag},
#{item.revision},
#{item.createdBy},

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcScoreDao.xml

@ -40,6 +40,8 @@
and MONTH_ID = #{monthId,jdbcType=VARCHAR}
and ALL_PARENT_INDEX_CODE = #{allParentCode,jdbcType=VARCHAR}
AND IS_TOTAL = '0'
order by USER_ID
limit #{offset}, #{pageSize}
</select>
@ -114,6 +116,7 @@
`SCORE`,
`INDEX_CODE`,
`ALL_PARENT_INDEX_CODE`,
WEIGHT,
`DEL_FLAG`,
`REVISION`,
`CREATED_BY`,
@ -135,6 +138,7 @@
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},
#{item.weight},
0,
0,
'APP_USER',

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CpcSubScoreDao.xml

@ -113,6 +113,7 @@
`SCORE`,
`INDEX_CODE`,
`ALL_PARENT_INDEX_CODE`,
WEIGHT,
`DEL_FLAG`,
`REVISION`,
`CREATED_BY`,
@ -133,6 +134,7 @@
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},
#{item.weight},
0,
0,
'APP_USER',

5
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml

@ -11,7 +11,8 @@
MONTH_ID monthId,
IS_TOTAL isTotal,
SCORE score,
INDEX_CODE indexCode
INDEX_CODE indexCode,
WEIGHT weight
FROM
fact_index_dept_score
WHERE
@ -83,6 +84,7 @@
SCORE,
INDEX_CODE,
ALL_PARENT_INDEX_CODE,
WEIGHT,
DEL_FLAG,
REVISION,
CREATED_BY,
@ -103,6 +105,7 @@
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},
#{item.weight},
0,
0,
'APP_USER',

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptSubScoreDao.xml

@ -16,6 +16,7 @@
SCORE,
INDEX_CODE,
ALL_PARENT_INDEX_CODE,
WEIGHT,
DEL_FLAG,
REVISION,
CREATED_BY,
@ -35,6 +36,7 @@
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},
#{item.weight},
0,
0,
'APP_USER',

7
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml

@ -52,6 +52,7 @@
`SCORE`,
`INDEX_CODE`,
ALL_PARENT_INDEX_CODE,
WEIGHT,
`DEL_FLAG`,
`REVISION`,
`CREATED_BY`,
@ -74,6 +75,7 @@
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},
#{item.weight},
0,
0,
'APP_USER',
@ -152,7 +154,8 @@
MONTH_ID monthId,
IS_TOTAL isTotal,
SCORE score,
INDEX_CODE indexCode
INDEX_CODE indexCode,
WEIGHT weight
FROM
fact_index_grid_score
WHERE
@ -175,4 +178,4 @@
ORDER BY GRID_ID
</select>
</mapper>
</mapper>

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridSubScoreDao.xml

@ -17,6 +17,7 @@
`SCORE`,
`INDEX_CODE`,
ALL_PARENT_INDEX_CODE,
WEIGHT,
`DEL_FLAG`,
`REVISION`,
`CREATED_BY`,
@ -38,6 +39,7 @@
#{item.score},
#{item.indexCode},
#{item.allParentIndexCode},
#{item.weight},
0,
0,
'APP_USER',

4
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.xml

@ -93,7 +93,9 @@
FROM
fact_index_party_ablity_cpc_monthly
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} AND DEL_FLAG = '0'
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
AND MONTH_ID = #{monthId,jdbcType=VARCHAR}
AND DEL_FLAG = '0'
</select>
<select id="getCountByMonthId" resultType="java.util.Map">

6
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/IndexGroupDetailDao.xml

@ -12,4 +12,10 @@
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and STATUS = 'enable' and DEL_FLAG = '0'
and ALL_PARENT_INDEX_CODE = #{indexCode,jdbcType=VARCHAR}
</select>
<select id="getAllIndexWeightList" resultType="com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity">
select ID, concat(ALL_PARENT_INDEX_CODE,':',INDEX_CODE) INDEX_CODE, WEIGHT, THRESHOLD FROM index_group_detail
WHERE
CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} and STATUS = 'enable' and DEL_FLAG = '0'
</select>
</mapper>

32
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml

@ -57,7 +57,7 @@
</foreach>
</insert>
<select id="selectListMismatcAgencyInfo" parameterType="map" resultType="com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity">
<select id="selectListMismatcCommunityAgencyInfo" parameterType="map" resultType="com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity">
SELECT
AGENCY_ID agencyId,
AGENCY_NAME agencyName,
@ -69,6 +69,7 @@
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID =#{customerId}
AND `LEVEL` = 'community'
<if test="agencyIds != null and agencyIds!= ''">
AND AGENCY_ID NOT IN
<foreach item="item" collection="agencyIds" open="(" separator="," close=")">
@ -98,4 +99,33 @@
del_flag = '0'
AND agency_id = #{agencyId}
</select>
<select id="selectListMismatcStreetAndDistrictAgencyInfo" parameterType="map" resultType="com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity">
SELECT
agencyId,
agencyName,
pid,
pids,
`level`
FROM(
SELECT
AGENCY_ID agencyId,
AGENCY_NAME agencyName,
PID pid,
PIDS pids,
`LEVEL` `level`
FROM
screen_customer_agency
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
AND (`LEVEL` = 'street' OR `LEVEL` = 'district')
) agency
<if test="agencyIds != null and agencyIds!= ''">
WHERE agencyId NOT IN
<foreach item="item" collection="agencyIds" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper>

32
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenIndexDataMonthlyDao.xml

@ -24,6 +24,9 @@
PARTY_DEV_ABLITY,
SERVICE_ABLITY,
GOVERN_ABLITY,
PARTY_DEV_WEIGHT,
SERVICE_ABLITY_WEIGHT,
GOVERN_ABLITY_WEIGHT,
DEL_FLAG,
REVISION,
CREATED_BY,
@ -46,6 +49,9 @@
#{item.partyDevAblity},
#{item.serviceAblity},
#{item.governAblity},
#{item.partyDevWeight},
#{item.serviceAblityWeight},
#{item.governAblityWeight},
0,
0,
'APP_USER',
@ -64,10 +70,10 @@
ORG_ID orgId,
PARENT_ID parentId,
ORG_NAME orgName,
SUM(INDEX_TOTAL) / #{month} as indexTotal,
SUM(PARTY_DEV_ABLITY) / #{month} as partyDevAblity,
SUM(SERVICE_ABLITY) / #{month} as serviceAblity,
SUM(GOVERN_ABLITY) / #{month} as governAblity
SUM(INDEX_TOTAL) / #{monthCount} as indexTotal,
SUM(PARTY_DEV_ABLITY) / #{monthCount} as partyDevAblity,
SUM(SERVICE_ABLITY) / #{monthCount} as serviceAblity,
SUM(GOVERN_ABLITY) / #{monthCount} as governAblity
FROM screen_index_data_monthly
WHERE DEL_FLAG = '0'
AND YEAR_ID = #{yearId}
@ -75,4 +81,22 @@
GROUP BY ORG_ID
</select>
<select id="selectCountIndexDataMonthly" parameterType="map" resultType="java.lang.Integer">
SELECT
COUNT(1)
FROM(
SELECT
distinct MONTH_ID
FROM screen_index_data_monthly
WHERE DEL_FLAG = '0'
AND YEAR_ID = #{yearId}
AND CUSTOMER_ID = #{customerId}
) monthCount
</select>
<delete id="deleteIndexDataMonthlyByOrgType">
delete from screen_index_data_monthly
where CUSTOMER_ID = #{customerId} AND MONTH_ID = #{monthId} AND ORG_TYPE = #{orgType}
limit 1000;
</delete>
</mapper>

6
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenKcVolunteerHeatRankGridDailyDao.xml

@ -14,6 +14,8 @@
<result property="userId" column="USER_ID"/>
<result property="userName" column="USER_NAME"/>
<result property="heartTime" column="HEART_TIME"/>
<result property="points" column="POINTS"/>
<result property="volunteerId" column="VOLUNTEER_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
@ -42,6 +44,8 @@
USER_ID,
USER_NAME,
HEART_TIME,
POINTS,
VOLUNTEER_ID,
DEL_FLAG,
REVISION,
@ -62,6 +66,8 @@
#{item.userId},
#{item.userName},
#{item.heartTime},
#{item.points},
#{item.volunteerId},
0,
0,
'APP_USER',

2
epmet-module/data-statistical/data-statistical-server/src/test/java/com/epmet/stats/test/normalizing/DemoScoreCal.java

@ -1,5 +1,6 @@
package com.epmet.stats.test.normalizing;
import com.alibaba.fastjson.JSON;
import com.epmet.support.normalizing.*;
import com.epmet.support.normalizing.batch.*;
import org.junit.Test;
@ -233,6 +234,7 @@ public class DemoScoreCal {
List<IndexInputVO> indexInputVOS = Arrays.asList(index1VO, index2VO, index3VO, index4VO);
BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator();
System.out.println("param:" + JSON.toJSONString(indexInputVOS));
HashMap<String, BigDecimal> result = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS);
HashMap<String, CalculateResult> result2 = batchScoreCalculator.getScoreTotalOfSampleId(indexInputVOS);

2
epmet-module/epmet-activiti/epmet-activiti-server/Dockerfile

@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8"
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
COPY ./target/*.jar ./app.jar
COPY ./target/*.jar ./epmet-activiti.jar
EXPOSE 8086

2
epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-dev.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/dev:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-activiti.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-prod.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/prod:/logs"
environment:
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-activiti.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-module/epmet-activiti/epmet-activiti-server/deploy/docker-compose-test.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/test:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-activiti.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-module/epmet-common-service/common-service-server/Dockerfile

@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8"
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
COPY ./target/*.jar ./app.jar
COPY ./target/*.jar ./common-service.jar
EXPOSE 8103

2
epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-dev.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/dev:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./common-service.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-prod.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/prod:/logs"
environment:
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./common-service.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-test.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/test:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./common-service.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-module/epmet-ext/epmet-ext-server/Dockerfile

@ -4,7 +4,7 @@ RUN export LANG="zh_CN.UTF-8"
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
COPY ./target/*.jar ./app.jar
COPY ./target/*.jar ./epmet-ext.jar
EXPOSE 8113

2
epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-dev.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/dev:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./epmet-ext.jar"
restart: "unless-stopped"
deploy:
resources:

2
epmet-module/epmet-ext/epmet-ext-server/deploy/docker-compose-prod.yml

@ -9,7 +9,7 @@ services:
volumes:
- "/opt/epmet-cloud-logs/prod:/logs"
environment:
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./app.jar"
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./epmet-ext.jar"
restart: "unless-stopped"
deploy:
resources:

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

Loading…
Cancel
Save