diff --git a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java index bca4441435..e540bdc6fe 100644 --- a/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java +++ b/epmet-commons/epmet-commons-dynamic-datasource/src/main/java/com/epmet/commons/dynamic/datasource/enums/DataSourceEnum.java @@ -5,9 +5,9 @@ package com.epmet.commons.dynamic.datasource.enums; */ public enum DataSourceEnum { - DATA_STATISTICAL_REAL("data-statistical-server", "real", "stats"), + DATA_STATISTICAL_REAL("data-statistical-server", "real", "evaluationIndex"), DATA_STATISTICAL_FAKE("data-statistical-server", "fake", "statsDisplay"), - DATA_REPORT_REAL("data-report-server", "real", "stats"), + DATA_REPORT_REAL("data-report-server", "real", "evaluationIndex"), DATA_REPORT_FAKE("data-report-server", "fake", "statsDisplay"), ; diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java index 0ac7dbf706..e906535166 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java @@ -1,5 +1,7 @@ package com.epmet.commons.tools.constant; +import java.math.BigDecimal; + /** * 常用数字常量 * @@ -56,4 +58,6 @@ public interface NumConstant { String POSITIVE_EIGHT_STR = "+8"; String EMPTY_STR = ""; String ONE_NEG_STR = "-1"; + + String FIFTY_STR="50"; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java index b640b06b67..d1e438d81a 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/constant/DataSourceConstant.java @@ -5,7 +5,7 @@ public interface DataSourceConstant { /** * 统计数据库 */ - String STATS = "stats"; + String EVALUATION_INDEX = "evaluationIndex"; String STATS_DISPLAY = "statsDisplay"; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java similarity index 82% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java index b1a25cf947..e3ac468fcf 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/constant/ScreenConstant.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/constant/ScreenConstant.java @@ -1,4 +1,4 @@ -package com.epmet.screen.constant; +package com.epmet.evaluationindex.screen.constant; /** * @Author zxc diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyAndNumFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyAndNumFormDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyAndNumFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyAndNumFormDTO.java index a20c10ce80..cd31c9688b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyAndNumFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyAndNumFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyFormDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyFormDTO.java index a9e479e3a5..166c9c2aa9 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyNumTypeParamFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyNumTypeParamFormDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyNumTypeParamFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyNumTypeParamFormDTO.java index 04dfc0625e..9e2e3c74a9 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/AgencyNumTypeParamFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/AgencyNumTypeParamFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchBuildRankFormDTO.java similarity index 96% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchBuildRankFormDTO.java index 458f2e4af5..43604bceb3 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildRankFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchBuildRankFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildTrendFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchBuildTrendFormDTO.java similarity index 96% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildTrendFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchBuildTrendFormDTO.java index 1d68458b20..9a0edf4677 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchBuildTrendFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchBuildTrendFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchFormDTO.java similarity index 89% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchFormDTO.java index 89a7bc5eaa..4094c81647 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/BranchFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/BranchFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/CompartmentFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/CompartmentFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/CompartmentFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/CompartmentFormDTO.java index 3571ff7bb6..dd4be9746b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/CompartmentFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/CompartmentFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ContactMassLineChartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ContactMassLineChartFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ContactMassLineChartFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ContactMassLineChartFormDTO.java index e82038de21..c2deeac60b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ContactMassLineChartFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ContactMassLineChartFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/FineExampleFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/FineExampleFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java index 1840c3048b..5ed5b9fc1a 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/FineExampleFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/FineExampleFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthBarchartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthBarchartFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthBarchartFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthBarchartFormDTO.java index ad454ff8dc..b6e0141d6a 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthBarchartFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthBarchartFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthPieChartFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthPieChartFormDTO.java index 0c188f427e..a5e9c53f26 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/MonthPieChartFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/MonthPieChartFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ParymemberFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ParymemberFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java index ee06b313d1..fdf525f37b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ParymemberFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ParymemberFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ProjectDetailFormDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ProjectDetailFormDTO.java index 88744ad004..756095fe1c 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectDetailFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ProjectDetailFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ProjectFormDTO.java similarity index 89% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ProjectFormDTO.java index 445cefc453..6c906e906f 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/ProjectFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ProjectFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankFormDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankFormDTO.java index 3410d0638f..608c6b0492 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/SubAgencyIndexRankFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/SubAgencyIndexRankFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/TopProfileFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/TopProfileFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/TopProfileFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/TopProfileFormDTO.java index 6b0d00dae1..ffe73581a2 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/TopProfileFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/TopProfileFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/UserFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/UserFormDTO.java similarity index 89% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/UserFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/UserFormDTO.java index 4a3b23da00..31b432e725 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/UserFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/UserFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/VolunteerServiceFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/VolunteerServiceFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/VolunteerServiceFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/VolunteerServiceFormDTO.java index 510bb5ec41..6df6c28ba1 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/VolunteerServiceFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/VolunteerServiceFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/YearAverageIndexFormDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/YearAverageIndexFormDTO.java index 80d526bd48..e53a94cfa9 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/form/YearAverageIndexFormDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/YearAverageIndexFormDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.form; +package com.epmet.evaluationindex.screen.dto.form; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AdvanceBranchRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AdvanceBranchRankResultDTO.java similarity index 95% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AdvanceBranchRankResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AdvanceBranchRankResultDTO.java index 912aedc1df..60545c7fc4 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AdvanceBranchRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AdvanceBranchRankResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AgencyDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgencyDistributionResultDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AgencyDistributionResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgencyDistributionResultDTO.java index da0a5a389e..753cf368dd 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/AgencyDistributionResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/AgencyDistributionResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildOrderByCountResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildOrderByCountResultDTO.java similarity index 89% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildOrderByCountResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildOrderByCountResultDTO.java index d6ba6ae18b..60448888de 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildOrderByCountResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildOrderByCountResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildRankResultDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildRankResultDTO.java index f7593319e1..f9c08afaea 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildRankResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildTrendResultDTO.java similarity index 95% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildTrendResultDTO.java index ee30981a68..fc3fc3958d 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchBuildTrendResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchBuildTrendResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchIssueDataResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchIssueDataResultDTO.java similarity index 87% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchIssueDataResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchIssueDataResultDTO.java index 65a6888047..7708001e26 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchIssueDataResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchIssueDataResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchResultDTO.java similarity index 89% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchResultDTO.java index f4a611cc10..431859c7d3 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchTrendSeriesDataResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchTrendSeriesDataResultDTO.java similarity index 91% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchTrendSeriesDataResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchTrendSeriesDataResultDTO.java index 7d5f415547..c1a921508f 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/BranchTrendSeriesDataResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/BranchTrendSeriesDataResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/CompartmentResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/CompartmentResultDTO.java index 2bf8ffd3d6..b959cf8ea7 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/CompartmentResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/CompartmentResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ContactMassLineChartResult.java similarity index 89% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResult.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ContactMassLineChartResult.java index e77c336fbe..2cac006003 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResult.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ContactMassLineChartResult.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ContactMassLineChartResultDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ContactMassLineChartResultDTO.java index 5a2b93acd9..69b5244ae0 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ContactMassLineChartResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ContactMassLineChartResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/DifficultProjectResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DifficultProjectResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/DifficultProjectResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DifficultProjectResultDTO.java index e89155d00c..fb37328232 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/DifficultProjectResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/DifficultProjectResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/FineExampleResultDTO.java similarity index 96% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/FineExampleResultDTO.java index a81f45fc05..b522e3166c 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/FineExampleResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/FineExampleResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityRankResultDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityRankResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityRankResultDTO.java index 318b290840..0f6b481e1c 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityRankResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityResultDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityResultDTO.java index dd2c09cd94..f51fe26255 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/GovernCapacityResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/GovernCapacityResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResult.java similarity index 88% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResult.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResult.java index ebf0d9d276..ef79775673 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResult.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResult.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResultDTO.java similarity index 88% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResultDTO.java index 479547a883..ad21904ba2 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthBarchartResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResultDTO.java @@ -1,6 +1,5 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; -import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java index 248f69d5ce..89ca2fd383 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/MonthPieChartResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthPieChartResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/OrgRankDataResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/OrgRankDataResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/OrgRankDataResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/OrgRankDataResultDTO.java index 87a8d482c9..9aff92593f 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/OrgRankDataResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/OrgRankDataResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartyUserPointResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartyUserPointResultDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartyUserPointResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartyUserPointResultDTO.java index 5ae10cb73e..3450a623a6 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartyUserPointResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartyUserPointResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberAgeDistributionResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberAgeDistributionResultDTO.java index 6ae70d9a67..4f9785b6b4 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgeDistributionResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberAgeDistributionResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgePercentResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberAgePercentResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgePercentResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberAgePercentResultDTO.java index c5eec4d539..4a301f0ca0 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberAgePercentResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberAgePercentResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberPercentResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberPercentResultDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberPercentResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberPercentResultDTO.java index eb8bc35184..a8ea84d711 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PartymemberPercentResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PartymemberPercentResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ParymemberDistributionResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ParymemberDistributionResultDTO.java index 180d6fd3c8..71efdac8ff 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberDistributionResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ParymemberDistributionResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ParymemberResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ParymemberResultDTO.java index 710ce303aa..a435dea3d3 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ParymemberResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ParymemberResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectDetailResultDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectDetailResultDTO.java index 234fe38034..6ad86b371f 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectDetailResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectDetailResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectResultDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectResultDTO.java index 7a0a016b25..5eb58d4f4f 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/ProjectResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/ProjectResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiChartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiChartResultDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiChartResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiChartResultDTO.java index 45f4f801ce..8f9ab22851 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiChartResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiChartResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java similarity index 95% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java index 52a127fd77..c5744d0cdd 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiProfileResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiProfileResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiRankResultDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiRankResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiRankResultDTO.java index b151901bdf..6d4eba5f4b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/PublicPartiRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/PublicPartiRankResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/SubAgencyIndexRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubAgencyIndexRankResultDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/SubAgencyIndexRankResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubAgencyIndexRankResultDTO.java index 5b0d89f39f..246b374752 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/SubAgencyIndexRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubAgencyIndexRankResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TopProfileResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TopProfileResultDTO.java similarity index 92% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TopProfileResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TopProfileResultDTO.java index 607891f5bf..55c281db6c 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TopProfileResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TopProfileResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TreeResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TreeResultDTO.java index 0f28cda5b2..8de1c1d377 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/TreeResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/TreeResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserDistributionResultDTO.java similarity index 93% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserDistributionResultDTO.java index de772f423b..2476f0497b 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserDistributionResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserDistributionResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java index cf870c9b18..a64f02a279 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinIndicatorGrowthRateResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinMonthlyResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinMonthlyResultDTO.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinMonthlyResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinMonthlyResultDTO.java index b35ce13c58..3b91a42d4e 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserJoinMonthlyResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserJoinMonthlyResultDTO.java @@ -1,7 +1,8 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; + import java.io.Serializable; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserPointRankResultDTO.java similarity index 91% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointRankResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserPointRankResultDTO.java index 43cc73e066..3a1330fa46 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserPointRankResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserPointResultDTO.java similarity index 87% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserPointResultDTO.java index 1f38d6886e..b58be28ff1 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserPointResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserPointResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserResultDTO.java index 592b3fd4af..f46da9b45e 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/UserResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/UserResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/VolunteerServiceResult.java similarity index 90% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResult.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/VolunteerServiceResult.java index bc2d53edff..4ef1fd076a 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResult.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/VolunteerServiceResult.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/VolunteerServiceResultDTO.java similarity index 94% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/VolunteerServiceResultDTO.java index e255f61124..e0df20afee 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/VolunteerServiceResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/VolunteerServiceResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/YearAverageIndexResultDTO.java similarity index 91% rename from epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java rename to epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/YearAverageIndexResultDTO.java index d05479d5d2..21c82e2e66 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/screen/dto/result/YearAverageIndexResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/YearAverageIndexResultDTO.java @@ -1,4 +1,4 @@ -package com.epmet.screen.dto.result; +package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; diff --git a/epmet-module/data-report/data-report-server/pom.xml b/epmet-module/data-report/data-report-server/pom.xml index ce8a6557bf..cf93830fce 100644 --- a/epmet-module/data-report/data-report-server/pom.xml +++ b/epmet-module/data-report/data-report-server/pom.xml @@ -123,6 +123,12 @@ epmet_data_stats_display_user EpmEt-db-UsEr + + + + epmet_evaluation_index_user + EpmEt-db-UsEr + 0 192.168.1.130 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java index 7d4fcfe070..1b063dd470 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java @@ -3,10 +3,10 @@ package com.epmet.datareport.controller.screen; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.datareport.service.screen.AgencyService; -import com.epmet.screen.dto.form.CompartmentFormDTO; -import com.epmet.screen.dto.result.CompartmentResultDTO; -import com.epmet.screen.dto.result.TreeResultDTO; +import com.epmet.datareport.service.evaluationindex.screen.AgencyService; +import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; +import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO; +import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java index 935dd13830..248547cc4c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/DistributionController.java @@ -2,9 +2,9 @@ package com.epmet.datareport.controller.screen; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.datareport.service.screen.DistributionService; -import com.epmet.screen.dto.form.*; -import com.epmet.screen.dto.result.*; +import com.epmet.datareport.service.evaluationindex.screen.DistributionService; +import com.epmet.evaluationindex.screen.dto.form.*; +import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java index 3cad80832d..220fb0ca4a 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassRootsGovernController.java @@ -2,11 +2,11 @@ package com.epmet.datareport.controller.screen; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.datareport.service.screen.GrassRootsGovernService; -import com.epmet.screen.dto.form.AgencyAndNumFormDTO; -import com.epmet.screen.dto.form.AgencyFormDTO; -import com.epmet.screen.dto.form.AgencyNumTypeParamFormDTO; -import com.epmet.screen.dto.result.*; +import com.epmet.datareport.service.evaluationindex.screen.GrassRootsGovernService; +import com.epmet.evaluationindex.screen.dto.form.AgencyAndNumFormDTO; +import com.epmet.evaluationindex.screen.dto.form.AgencyFormDTO; +import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java index 34823bd3fd..66b7555ac8 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/GrassrootsPartyDevController.java @@ -2,14 +2,14 @@ package com.epmet.datareport.controller.screen; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.datareport.service.screen.GrassrootsPartyDevService; -import com.epmet.screen.dto.form.BranchBuildRankFormDTO; -import com.epmet.screen.dto.form.BranchBuildTrendFormDTO; -import com.epmet.screen.dto.form.ParymemberFormDTO; -import com.epmet.screen.dto.result.BranchBuildRankResultDTO; -import com.epmet.screen.dto.result.BranchBuildTrendResultDTO; -import com.epmet.screen.dto.result.PartymemberAgeDistributionResultDTO; -import com.epmet.screen.dto.result.PartymemberPercentResultDTO; +import com.epmet.datareport.service.evaluationindex.screen.GrassrootsPartyDevService; +import com.epmet.evaluationindex.screen.dto.form.BranchBuildRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.BranchBuildTrendFormDTO; +import com.epmet.evaluationindex.screen.dto.form.ParymemberFormDTO; +import com.epmet.evaluationindex.screen.dto.result.BranchBuildRankResultDTO; +import com.epmet.evaluationindex.screen.dto.result.BranchBuildTrendResultDTO; +import com.epmet.evaluationindex.screen.dto.result.PartymemberAgeDistributionResultDTO; +import com.epmet.evaluationindex.screen.dto.result.PartymemberPercentResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java index ba4a24ec52..d670c65b1c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java @@ -1,17 +1,16 @@ package com.epmet.datareport.controller.screen; -import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.datareport.service.screen.IndexService; -import com.epmet.screen.dto.form.MonthBarchartFormDTO; -import com.epmet.screen.dto.form.MonthPieChartFormDTO; -import com.epmet.screen.dto.form.SubAgencyIndexRankFormDTO; -import com.epmet.screen.dto.form.YearAverageIndexFormDTO; -import com.epmet.screen.dto.result.MonthBarchartResultDTO; -import com.epmet.screen.dto.result.MonthPieChartResultDTO; -import com.epmet.screen.dto.result.SubAgencyIndexRankResultDTO; -import com.epmet.screen.dto.result.YearAverageIndexResultDTO; +import com.epmet.datareport.service.evaluationindex.screen.IndexService; +import com.epmet.evaluationindex.screen.dto.form.MonthBarchartFormDTO; +import com.epmet.evaluationindex.screen.dto.form.MonthPieChartFormDTO; +import com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.YearAverageIndexFormDTO; +import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResultDTO; +import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO; +import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO; +import com.epmet.evaluationindex.screen.dto.result.YearAverageIndexResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java index 0f3fe32130..d3f4242013 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/PartyMemberLeadController.java @@ -2,9 +2,9 @@ package com.epmet.datareport.controller.screen; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.datareport.service.screen.PartyMemberLeadService; -import com.epmet.screen.dto.form.*; -import com.epmet.screen.dto.result.*; +import com.epmet.datareport.service.evaluationindex.screen.PartyMemberLeadService; +import com.epmet.evaluationindex.screen.dto.form.*; +import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java index 79d61f5f75..dc80b5178e 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/ScreenProjectController.java @@ -2,9 +2,9 @@ package com.epmet.datareport.controller.screen; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; -import com.epmet.datareport.service.screen.ScreenProjectService; -import com.epmet.screen.dto.form.ProjectDetailFormDTO; -import com.epmet.screen.dto.result.ProjectDetailResultDTO; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectService; +import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO; +import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java similarity index 89% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCpcBaseDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java index 87f26f3b01..e752fe40dd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCpcBaseDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java @@ -15,9 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.result.PartymemberAgeDistributionResultDTO; +import com.epmet.evaluationindex.screen.dto.result.PartymemberAgeDistributionResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerAgencyDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index c97ac8b8e0..17c48ae989 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -15,9 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.result.*; +import com.epmet.evaluationindex.screen.dto.result.*; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerDeptDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerDeptDao.java similarity index 94% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerDeptDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerDeptDao.java index e6ae450514..15ed670395 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerDeptDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerDeptDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; import org.apache.ibatis.annotations.Mapper; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerGridDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java index ec6a2e7ee1..b6196411f8 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -15,9 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.result.*; +import com.epmet.evaluationindex.screen.dto.result.*; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java similarity index 90% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenDifficultyDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java index 17d2e7a420..8697ba9adf 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenDifficultyDataDao.java @@ -15,9 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.result.DifficultProjectResultDTO; +import com.epmet.evaluationindex.screen.dto.result.DifficultProjectResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenEventDataDao.java similarity index 87% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenEventDataDao.java index 24604bf1de..16e023adff 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenEventDataDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.result.ProjectDetailResultDTO; -import com.epmet.screen.dto.result.ProjectResultDTO; +import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO; +import com.epmet.evaluationindex.screen.dto.result.ProjectResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventImgDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenEventImgDataDao.java similarity index 95% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventImgDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenEventImgDataDao.java index 8090ce00c7..f0da56ccd9 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenEventImgDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenEventImgDataDao.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenGovernRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenGovernRankDataDao.java similarity index 90% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenGovernRankDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenGovernRankDataDao.java index 3cf167fc5e..e973aa85f3 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenGovernRankDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenGovernRankDataDao.java @@ -15,9 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.result.GovernCapacityResultDTO; +import com.epmet.evaluationindex.screen.dto.result.GovernCapacityResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java similarity index 80% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataMonthlyDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index 028fbf6142..372dacf9dd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -15,13 +15,12 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.form.SubAgencyIndexRankFormDTO; -import com.epmet.screen.dto.result.MonthBarchartResult; -import com.epmet.screen.dto.result.MonthBarchartResultDTO; -import com.epmet.screen.dto.result.MonthPieChartResultDTO; -import com.epmet.screen.dto.result.SubAgencyIndexRankResultDTO; +import com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO; +import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResult; +import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO; +import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -42,7 +41,7 @@ public interface ScreenIndexDataMonthlyDao{ * @author zxc * @date 2020/8/19 3:43 下午 */ - MonthPieChartResultDTO selectMonthPieChart(@Param("agencyId")String agencyId); + MonthPieChartResultDTO selectMonthPieChart(@Param("agencyId")String agencyId,@Param("monthId")String monthId); /** * @Description 查询近一年的指数值【不包括本月】 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java similarity index 89% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataYearlyDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java index 304351b3b7..c63c17fa57 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenIndexDataYearlyDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java @@ -15,9 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.result.YearAverageIndexResultDTO; +import com.epmet.evaluationindex.screen.dto.result.YearAverageIndexResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenOrgRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenOrgRankDataDao.java similarity index 90% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenOrgRankDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenOrgRankDataDao.java index fbee5cd15c..2b9bdba497 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenOrgRankDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenOrgRankDataDao.java @@ -15,9 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.result.OrgRankDataResultDTO; +import com.epmet.evaluationindex.screen.dto.result.OrgRankDataResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java similarity index 90% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java index f28a23354b..fa2836e4fb 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyBranchDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.result.BranchBuildOrderByCountResultDTO; -import com.epmet.screen.dto.result.BranchIssueDataResultDTO; -import com.epmet.screen.dto.result.VolunteerServiceResult; +import com.epmet.evaluationindex.screen.dto.result.BranchBuildOrderByCountResultDTO; +import com.epmet.evaluationindex.screen.dto.result.BranchIssueDataResultDTO; +import com.epmet.evaluationindex.screen.dto.result.VolunteerServiceResult; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java similarity index 90% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyLinkMassesDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java index dfa5c1f6d2..1ca974982f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyLinkMassesDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java @@ -15,9 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.result.ContactMassLineChartResult; +import com.epmet.evaluationindex.screen.dto.result.ContactMassLineChartResult; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java similarity index 88% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyUserRankDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java index 946ac2a096..2c4358ce15 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPartyUserRankDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.result.PartyUserPointResultDTO; -import com.epmet.screen.dto.result.UserPointResultDTO; +import com.epmet.evaluationindex.screen.dto.result.PartyUserPointResultDTO; +import com.epmet.evaluationindex.screen.dto.result.UserPointResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPioneerDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java similarity index 90% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPioneerDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java index 4b477689c3..92177ec52c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPioneerDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPioneerDataDao.java @@ -15,9 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.result.FineExampleResultDTO; +import com.epmet.evaluationindex.screen.dto.result.FineExampleResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPublicPartiTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java similarity index 89% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPublicPartiTotalDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java index 02d7e0c722..88c2aa0e77 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenPublicPartiTotalDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java @@ -15,10 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.screen.dto.result.PublicPartiRankResultDTO; +import com.epmet.evaluationindex.screen.dto.result.PublicPartiRankResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserJoinDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserJoinDao.java similarity index 87% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserJoinDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserJoinDao.java index 0edee635d4..962691f625 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserJoinDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserJoinDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.result.UserJoinIndicatorGrowthRateResultDTO; -import com.epmet.screen.dto.result.UserJoinMonthlyResultDTO; +import com.epmet.evaluationindex.screen.dto.result.UserJoinIndicatorGrowthRateResultDTO; +import com.epmet.evaluationindex.screen.dto.result.UserJoinMonthlyResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java similarity index 89% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java index 2230e636b9..653cf3f606 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/screen/ScreenUserTotalDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenUserTotalDataDao.java @@ -15,15 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.datareport.dao.screen; +package com.epmet.datareport.dao.evaluationindex.screen; -import com.epmet.screen.dto.result.PartymemberPercentResultDTO; -import com.epmet.screen.dto.result.TopProfileResultDTO; +import com.epmet.evaluationindex.screen.dto.result.PartymemberPercentResultDTO; +import com.epmet.evaluationindex.screen.dto.result.TopProfileResultDTO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import java.util.List; - /** * 中央区-各类(用户|党员|党群|话题|议题|项目|注册人数|参与人数)总数 * diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java similarity index 68% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/AgencyService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java index d3eee4f133..d633b94ea2 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/AgencyService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java @@ -1,12 +1,9 @@ -package com.epmet.datareport.service.screen; +package com.epmet.datareport.service.evaluationindex.screen; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; -import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.screen.dto.form.CompartmentFormDTO; -import com.epmet.screen.dto.result.CompartmentResultDTO; -import com.epmet.screen.dto.result.TreeResultDTO; - -import java.util.List; +import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; +import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO; +import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO; /** * 组织相关api diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/DistributionService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/DistributionService.java similarity index 87% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/DistributionService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/DistributionService.java index 62a0d0d7bf..a73d1ccfcd 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/DistributionService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/DistributionService.java @@ -1,7 +1,7 @@ -package com.epmet.datareport.service.screen; +package com.epmet.datareport.service.evaluationindex.screen; -import com.epmet.screen.dto.form.*; -import com.epmet.screen.dto.result.*; +import com.epmet.evaluationindex.screen.dto.form.*; +import com.epmet.evaluationindex.screen.dto.result.*; import java.util.List; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassRootsGovernService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassRootsGovernService.java similarity index 86% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassRootsGovernService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassRootsGovernService.java index 12315295b5..fecde12a9f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassRootsGovernService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassRootsGovernService.java @@ -1,9 +1,9 @@ -package com.epmet.datareport.service.screen; +package com.epmet.datareport.service.evaluationindex.screen; -import com.epmet.screen.dto.form.AgencyAndNumFormDTO; -import com.epmet.screen.dto.form.AgencyFormDTO; -import com.epmet.screen.dto.form.AgencyNumTypeParamFormDTO; -import com.epmet.screen.dto.result.*; +import com.epmet.evaluationindex.screen.dto.form.AgencyAndNumFormDTO; +import com.epmet.evaluationindex.screen.dto.form.AgencyFormDTO; +import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import java.util.List; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassrootsPartyDevService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassrootsPartyDevService.java similarity index 71% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassrootsPartyDevService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassrootsPartyDevService.java index a870d21585..41c8fafc28 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/GrassrootsPartyDevService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/GrassrootsPartyDevService.java @@ -1,12 +1,12 @@ -package com.epmet.datareport.service.screen; +package com.epmet.datareport.service.evaluationindex.screen; -import com.epmet.screen.dto.form.BranchBuildRankFormDTO; -import com.epmet.screen.dto.form.BranchBuildTrendFormDTO; -import com.epmet.screen.dto.form.ParymemberFormDTO; -import com.epmet.screen.dto.result.BranchBuildRankResultDTO; -import com.epmet.screen.dto.result.BranchBuildTrendResultDTO; -import com.epmet.screen.dto.result.PartymemberAgeDistributionResultDTO; -import com.epmet.screen.dto.result.PartymemberPercentResultDTO; +import com.epmet.evaluationindex.screen.dto.form.BranchBuildRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.BranchBuildTrendFormDTO; +import com.epmet.evaluationindex.screen.dto.form.ParymemberFormDTO; +import com.epmet.evaluationindex.screen.dto.result.BranchBuildRankResultDTO; +import com.epmet.evaluationindex.screen.dto.result.BranchBuildTrendResultDTO; +import com.epmet.evaluationindex.screen.dto.result.PartymemberAgeDistributionResultDTO; +import com.epmet.evaluationindex.screen.dto.result.PartymemberPercentResultDTO; /** * 基层党建相关各指标查询 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java similarity index 64% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java index 5f840c2369..266898530d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/IndexService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/IndexService.java @@ -1,13 +1,13 @@ -package com.epmet.datareport.service.screen; - -import com.epmet.screen.dto.form.MonthBarchartFormDTO; -import com.epmet.screen.dto.form.MonthPieChartFormDTO; -import com.epmet.screen.dto.form.SubAgencyIndexRankFormDTO; -import com.epmet.screen.dto.form.YearAverageIndexFormDTO; -import com.epmet.screen.dto.result.MonthBarchartResultDTO; -import com.epmet.screen.dto.result.MonthPieChartResultDTO; -import com.epmet.screen.dto.result.SubAgencyIndexRankResultDTO; -import com.epmet.screen.dto.result.YearAverageIndexResultDTO; +package com.epmet.datareport.service.evaluationindex.screen; + +import com.epmet.evaluationindex.screen.dto.form.MonthBarchartFormDTO; +import com.epmet.evaluationindex.screen.dto.form.MonthPieChartFormDTO; +import com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.YearAverageIndexFormDTO; +import com.epmet.evaluationindex.screen.dto.result.MonthBarchartResultDTO; +import com.epmet.evaluationindex.screen.dto.result.MonthPieChartResultDTO; +import com.epmet.evaluationindex.screen.dto.result.SubAgencyIndexRankResultDTO; +import com.epmet.evaluationindex.screen.dto.result.YearAverageIndexResultDTO; import java.util.List; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/PartyMemberLeadService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/PartyMemberLeadService.java similarity index 79% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/PartyMemberLeadService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/PartyMemberLeadService.java index 5f781b2622..5e75a3946c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/PartyMemberLeadService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/PartyMemberLeadService.java @@ -1,10 +1,10 @@ -package com.epmet.datareport.service.screen; +package com.epmet.datareport.service.evaluationindex.screen; -import com.epmet.screen.dto.form.AgencyAndNumFormDTO; -import com.epmet.screen.dto.form.ContactMassLineChartFormDTO; -import com.epmet.screen.dto.form.FineExampleFormDTO; -import com.epmet.screen.dto.form.VolunteerServiceFormDTO; -import com.epmet.screen.dto.result.*; +import com.epmet.evaluationindex.screen.dto.form.AgencyAndNumFormDTO; +import com.epmet.evaluationindex.screen.dto.form.ContactMassLineChartFormDTO; +import com.epmet.evaluationindex.screen.dto.form.FineExampleFormDTO; +import com.epmet.evaluationindex.screen.dto.form.VolunteerServiceFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import java.util.List; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ScreenProjectService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectService.java similarity index 63% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ScreenProjectService.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectService.java index 78543bc52f..aea908ff15 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/ScreenProjectService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/ScreenProjectService.java @@ -1,7 +1,7 @@ -package com.epmet.datareport.service.screen; +package com.epmet.datareport.service.evaluationindex.screen; -import com.epmet.screen.dto.form.ProjectDetailFormDTO; -import com.epmet.screen.dto.result.ProjectDetailResultDTO; +import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO; +import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO; /** * 项目 diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java similarity index 85% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index 0727ebfbde..6eef8b2387 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -1,17 +1,17 @@ -package com.epmet.datareport.service.screen.impl; +package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; -import com.epmet.datareport.dao.screen.ScreenCustomerAgencyDao; -import com.epmet.datareport.dao.screen.ScreenCustomerGridDao; -import com.epmet.screen.dto.form.CompartmentFormDTO; -import com.epmet.screen.dto.result.AgencyDistributionResultDTO; -import com.epmet.screen.constant.*; -import com.epmet.screen.dto.result.CompartmentResultDTO; -import com.epmet.screen.dto.result.TreeResultDTO; -import com.epmet.datareport.service.screen.AgencyService; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerGridDao; +import com.epmet.datareport.service.evaluationindex.screen.AgencyService; +import com.epmet.evaluationindex.screen.constant.ScreenConstant; +import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; +import com.epmet.evaluationindex.screen.dto.result.AgencyDistributionResultDTO; +import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO; +import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -25,6 +25,7 @@ import java.util.List; * @date 2020/8/18 10:18 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class AgencyServiceImpl implements AgencyService { @Autowired @@ -38,7 +39,7 @@ public class AgencyServiceImpl implements AgencyService { * @author zxc * @date 2020/8/18 2:04 下午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public TreeResultDTO tree(ExternalAppRequestParam externalAppRequestParam) { // 1. 查询客户根组织ID @@ -118,7 +119,7 @@ public class AgencyServiceImpl implements AgencyService { * @author zxc * @date 2020/8/18 2:33 下午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public CompartmentResultDTO compartment(CompartmentFormDTO compartmentFormDTO) { CompartmentResultDTO agencyAreaInfo = screenCustomerAgencyDao.getAgencyAreaInfo(compartmentFormDTO.getAgencyId()); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/DistributionServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java similarity index 79% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/DistributionServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java index 97a627fb23..b65c0fe059 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/DistributionServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/DistributionServiceImpl.java @@ -1,16 +1,16 @@ -package com.epmet.datareport.service.screen.impl; +package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; -import com.epmet.datareport.dao.screen.ScreenCustomerAgencyDao; -import com.epmet.datareport.dao.screen.ScreenCustomerGridDao; -import com.epmet.datareport.dao.screen.ScreenEventDataDao; -import com.epmet.datareport.dao.screen.ScreenUserTotalDataDao; -import com.epmet.screen.dto.form.*; -import com.epmet.screen.dto.result.*; -import com.epmet.screen.constant.*; -import com.epmet.datareport.service.screen.DistributionService; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerGridDao; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenEventDataDao; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenUserTotalDataDao; +import com.epmet.datareport.service.evaluationindex.screen.DistributionService; +import com.epmet.evaluationindex.screen.constant.ScreenConstant; +import com.epmet.evaluationindex.screen.dto.form.*; +import com.epmet.evaluationindex.screen.dto.result.*; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -25,6 +25,7 @@ import java.util.List; * @date 2020/8/18 10:19 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class DistributionServiceImpl implements DistributionService { @Autowired @@ -42,7 +43,7 @@ public class DistributionServiceImpl implements DistributionService { * @author zxc * @date 2020/8/18 10:59 上午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public List branch(BranchFormDTO formDTO) { List branchResultDTOS = screenCustomerGridDao.selectBranch(formDTO.getAgencyId()); @@ -55,7 +56,7 @@ public class DistributionServiceImpl implements DistributionService { * @author zxc * @date 2020/8/18 11:10 上午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public UserResultDTO user(UserFormDTO userFormDTO) { UserResultDTO userResult = new UserResultDTO(); @@ -80,7 +81,7 @@ public class DistributionServiceImpl implements DistributionService { * @author zxc * @date 2020/8/18 11:20 上午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public ParymemberResultDTO parymember(ParymemberFormDTO parymemberFormDTO) { ParymemberResultDTO parymemberResult = new ParymemberResultDTO(); @@ -105,7 +106,7 @@ public class DistributionServiceImpl implements DistributionService { * @author zxc * @date 2020/8/19 1:29 下午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public List project(ProjectFormDTO projectFormDTO) { List projectResultDTOS = screenEventDataDao.selectEvent(projectFormDTO.getAgencyId()); @@ -121,7 +122,7 @@ public class DistributionServiceImpl implements DistributionService { * @author zxc * @date 2020/8/19 1:52 下午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public TopProfileResultDTO topProfile(TopProfileFormDTO topProfileFormDTO) { TopProfileResultDTO topProfileResultDTO = screenUserTotalDataDao.selectTopProfile(topProfileFormDTO.getAgencyId()); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java similarity index 83% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java index f798d5047e..bf8fe359d2 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassRootsGovernServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java @@ -1,20 +1,21 @@ -package com.epmet.datareport.service.screen.impl; +package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; -import com.epmet.datareport.dao.screen.*; -import com.epmet.datareport.service.screen.GrassRootsGovernService; +import com.epmet.datareport.dao.evaluationindex.screen.*; +import com.epmet.datareport.service.evaluationindex.screen.GrassRootsGovernService; import com.epmet.datareport.utils.DateUtils; import com.epmet.datareport.utils.ModuleConstant; -import com.epmet.screen.dto.form.AgencyAndNumFormDTO; -import com.epmet.screen.dto.form.AgencyFormDTO; -import com.epmet.screen.dto.form.AgencyNumTypeParamFormDTO; -import com.epmet.screen.dto.result.*; +import com.epmet.evaluationindex.screen.dto.form.AgencyAndNumFormDTO; +import com.epmet.evaluationindex.screen.dto.form.AgencyFormDTO; +import com.epmet.evaluationindex.screen.dto.form.AgencyNumTypeParamFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import com.github.pagehelper.PageHelper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.util.ArrayList; @@ -30,6 +31,7 @@ import java.util.stream.Collectors; * @date 2020/8/18 10:20 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { @Autowired @@ -41,8 +43,6 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { @Autowired private DateUtils dateUtils; @Autowired - private ScreenUserTotalDataDao screenUserTotalDataDao; - @Autowired private ScreenGovernRankDataDao screenGovernRankDataDao; @Autowired private ScreenPublicPartiTotalDataDao screenPublicPartiTotalDataDao; @@ -55,7 +55,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { * @author wangc * @date 2020.08.20 11:16 **/ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public UserPointRankResultDTO userPointRank(AgencyAndNumFormDTO param) { //默认5 @@ -79,7 +79,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { * @author wangc * @date 2020.08.20 13:55 **/ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public List difficultProject(AgencyNumTypeParamFormDTO param) { if(null == param.getTopNum()){ @@ -100,12 +100,21 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { * @author wangc * @date 2020.08.20 14:37 **/ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public PublicPartiProfileResultDTO publicPartiProfile(AgencyFormDTO param) { String monthId = dateUtils.getCurrentMonthId(); UserJoinIndicatorGrowthRateResultDTO latest = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId); + //保证获取公众参与概率数据的最大可能性 + int time = NumConstant.TWELVE; + while(null == latest && time > NumConstant.ONE) + { + time --; + monthId = dateUtils.getPreviousMonthIdByDest(null,monthId); + latest = screenUserJoinDao.selectUserJoinData(param.getAgencyId(), monthId); + } + if(null == latest) return new PublicPartiProfileResultDTO(); PublicPartiProfileResultDTO result = ConvertUtils.sourceToTarget(latest,PublicPartiProfileResultDTO.class); result.setMonthIncr(convertPercentStr(latest.getMonthIncr(),NumConstant.ZERO)); @@ -122,7 +131,7 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { * @author wangc * @date 2020.08.20 15:32 **/ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public List publicPartiRank(AgencyAndNumFormDTO param) { if(null == param.getTopNum()){ @@ -147,14 +156,22 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { * @author wangc * @date 2020.08.20 17:46 **/ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public List governCapacityRank(AgencyAndNumFormDTO param) { if(null == param.getTopNum()) param.setTopNum(NumConstant.FIVE); if(NumConstant.ZERO == param.getTopNum()) param.setTopNum(NumConstant.MAX); PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + String monthId = dateUtils.getCurrentMonthId(); List orderList = - screenGovernRankDataDao.selectGovernCapacityRatio(dateUtils.getCurrentMonthId(),param.getAgencyId()); + screenGovernRankDataDao.selectGovernCapacityRatio(monthId,param.getAgencyId()); + int time = NumConstant.TWELVE; + while(CollectionUtils.isEmpty(orderList) && time > NumConstant.ONE){ + time--; + monthId = dateUtils.getPreviousMonthIdByDest(null ,monthId); + orderList = + screenGovernRankDataDao.selectGovernCapacityRatio(monthId,param.getAgencyId()); + } if(null == orderList || orderList.isEmpty()) return new ArrayList<>(); List result = new LinkedList<>(); orderList.forEach(o -> { diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java similarity index 73% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java index 4fa8a23c20..a336d356cc 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/GrassrootsPartyDevServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassrootsPartyDevServiceImpl.java @@ -1,28 +1,27 @@ -package com.epmet.datareport.service.screen.impl; +package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; -import com.epmet.datareport.dao.screen.ScreenCpcBaseDataDao; -import com.epmet.datareport.dao.screen.ScreenPartyBranchDataDao; -import com.epmet.datareport.dao.screen.ScreenUserTotalDataDao; -import com.epmet.datareport.service.screen.GrassrootsPartyDevService; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenCpcBaseDataDao; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenPartyBranchDataDao; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenUserTotalDataDao; +import com.epmet.datareport.service.evaluationindex.screen.GrassrootsPartyDevService; import com.epmet.datareport.utils.DateUtils; import com.epmet.datareport.utils.ModuleConstant; -import com.epmet.screen.dto.form.BranchBuildRankFormDTO; -import com.epmet.screen.dto.form.BranchBuildTrendFormDTO; -import com.epmet.screen.dto.form.ParymemberFormDTO; -import com.epmet.screen.dto.result.*; +import com.epmet.evaluationindex.screen.dto.form.BranchBuildRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.BranchBuildTrendFormDTO; +import com.epmet.evaluationindex.screen.dto.form.ParymemberFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import com.github.pagehelper.PageHelper; -import com.google.common.collect.Maps; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import java.math.BigDecimal; -import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; @@ -33,6 +32,7 @@ import java.util.stream.Collectors; * @date 2020/8/18 10:21 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService { private static final Logger logger = LoggerFactory.getLogger(GrassrootsPartyDevServiceImpl.class); @@ -54,7 +54,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService * @author wangc * @date 2020.08.18 14:58 **/ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public PartymemberPercentResultDTO partymemberBaseInfo(ParymemberFormDTO param) { @@ -83,7 +83,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService * @author wangc * @date 2020.08.18 17:54 **/ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public PartymemberAgeDistributionResultDTO partymemberAgeDistribution(ParymemberFormDTO param) { return screenCpcBaseDataDao.selectPartymemberAgeDistribution(param.getAgencyId()); @@ -97,7 +97,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService * @author wangc * @date 2020.08.19 11:02 **/ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public BranchBuildTrendResultDTO branchBuildTrend(BranchBuildTrendFormDTO param) { if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_UNION,param.getCategory())){ @@ -112,7 +112,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService } BranchBuildTrendResultDTO result = new BranchBuildTrendResultDTO(); //生成近十二个月的横坐标数组 - Map monthMap = getX(); + Map monthMap = dateUtils.getXpro(); result.setXAxis(monthMap.values().stream().collect(Collectors.toList())); List dataArray = new LinkedList<>(); @@ -155,12 +155,22 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService result.setSeriesData(dataArray); result.setLegend(null == result.getLegend() ? new ArrayList<>() : result.getLegend()); + List _ymList = monthMap.keySet().stream().collect(Collectors.toList()); //总组织次数 Integer totalOrganizationCount = screenPartyBranchDataDao.selectTotalOrganizationCount(param.getCategory(),ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,param.getAgencyId(),monthMap.keySet().iterator().next()); + //自旋一次 + totalOrganizationCount = Optional.ofNullable(totalOrganizationCount).orElse( + screenPartyBranchDataDao.selectTotalOrganizationCount(param.getCategory(),ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,param.getAgencyId(),_ymList.get(NumConstant.ONE)) + ); //总参与人数 Integer totalJoinUserCount = screenPartyBranchDataDao.selectTotalOrganizationCount(param.getCategory(),ModuleConstant.PARAM_BRANCH_DATA_TYPE_JOIN,param.getAgencyId(),monthMap.keySet().iterator().next()); - result.setTotalOrganizationCount(null == totalOrganizationCount ? NumConstant.ZERO : totalOrganizationCount); - result.setTotalJoinUserCount(null == totalJoinUserCount ? NumConstant.ZERO : totalJoinUserCount); + //自旋一次 + totalJoinUserCount = Optional.ofNullable(totalJoinUserCount).orElse( + screenPartyBranchDataDao.selectTotalOrganizationCount(param.getCategory(),ModuleConstant.PARAM_BRANCH_DATA_TYPE_JOIN,param.getAgencyId(),_ymList.get(NumConstant.ONE)) + ); + + result.setTotalOrganizationCount(Optional.ofNullable(totalOrganizationCount).orElse(NumConstant.ZERO)); + result.setTotalJoinUserCount(Optional.ofNullable(totalJoinUserCount).orElse(NumConstant.ZERO)); return result; } @@ -172,7 +182,7 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService * @author wangc * @date 2020.08.19 15:25 **/ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public BranchBuildRankResultDTO branchBuildRank(BranchBuildRankFormDTO param) { if(StringUtils.equals(ModuleConstant.PARAM_BRANCH_CATEGORY_UNION,param.getCategory())){ @@ -193,6 +203,15 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService List orderList = screenPartyBranchDataDao.selectBranchDataByTypeOrder(param.getAgencyId(),param.getCategory(),param.getMonthId(),param.getBottomMonthId()); + int time = NumConstant.TWELVE; + while(CollectionUtils.isEmpty(orderList) && time > NumConstant.ONE){ + time --; + param.setMonthId(dateUtils.getPreviousMonthIdByDest(null,param.getMonthId())); + orderList = + screenPartyBranchDataDao.selectBranchDataByTypeOrder(param.getAgencyId(),param.getCategory(),param.getMonthId(),param.getBottomMonthId()); + } + + BranchBuildRankResultDTO result = new BranchBuildRankResultDTO(); result.setJoinData(new LinkedList<>()); result.setOrganizeData(new LinkedList<>()); @@ -212,59 +231,6 @@ public class GrassrootsPartyDevServiceImpl implements GrassrootsPartyDevService return percentStr.concat(ModuleConstant.SYMBOL_PERCENT); } - /** - * @Description 返回当前月以及前十一个月,升序 - * @param - * @return Map key:202001 value:1月 - * @author wangc - * @date 2020.08.19 12:46 - **/ - public Map getX(){ - SimpleDateFormat format = new SimpleDateFormat("yyyyMM"); - Calendar calendar = Calendar.getInstance(); - calendar.setTime(new Date()); // 设置为当前时间 - //calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) - 1); // 设置为上一个月 - String currentMonth = format.format(calendar.getTime()); - Integer monthCounter = Integer.parseInt(currentMonth); - Map monthMap = new HashMap<>(); - int i = NumConstant.ONE; - while(i <= NumConstant.TWELVE){ - - if(monthCounter.toString().endsWith("00")){ - monthCounter -= NumConstant.EIGHTY_EIGHT; - } - - String abscissa = monthCounter.toString().substring(monthCounter.toString().length() - NumConstant.TWO); - if(abscissa.startsWith("0")) { - abscissa = abscissa.replace("0","").concat("月"); - }else{ - abscissa = abscissa.concat("月"); - } - monthMap.put(monthCounter.toString(),abscissa); - monthCounter-- ; - i++; - } - Map result = Maps.newLinkedHashMap(); - monthMap.entrySet().stream().sorted(Map.Entry.comparingByKey()) - .forEachOrdered((e -> result.put(e.getKey(),e.getValue()))); - return result; - } - - - /** - * @Description 得到上个月的monthId - * @param - * @return - * @author wangc - * @date 2020.08.20 10:19 - **/ - private String getPreviousMonthId(){ - SimpleDateFormat format = new SimpleDateFormat("yyyyMM"); - Calendar calendar = Calendar.getInstance(); - calendar.setTime(new Date()); // 设置为当前时间 - calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) - 1); // 设置为上一个月 - return format.format(calendar.getTime()); - } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java similarity index 56% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index a747d93c31..22f6aa376b 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -1,19 +1,21 @@ -package com.epmet.datareport.service.screen.impl; +package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; -import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.constant.DataSourceConstant; -import com.epmet.datareport.dao.screen.ScreenIndexDataMonthlyDao; -import com.epmet.datareport.dao.screen.ScreenIndexDataYearlyDao; -import com.epmet.datareport.service.screen.IndexService; -import com.epmet.screen.dto.form.MonthBarchartFormDTO; -import com.epmet.screen.dto.form.MonthPieChartFormDTO; -import com.epmet.screen.dto.form.SubAgencyIndexRankFormDTO; -import com.epmet.screen.dto.form.YearAverageIndexFormDTO; -import com.epmet.screen.dto.result.*; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenIndexDataMonthlyDao; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenIndexDataYearlyDao; +import com.epmet.datareport.service.evaluationindex.screen.IndexService; +import com.epmet.datareport.utils.DateUtils; +import com.epmet.evaluationindex.screen.dto.form.MonthBarchartFormDTO; +import com.epmet.evaluationindex.screen.dto.form.MonthPieChartFormDTO; +import com.epmet.evaluationindex.screen.dto.form.SubAgencyIndexRankFormDTO; +import com.epmet.evaluationindex.screen.dto.form.YearAverageIndexFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import java.time.LocalDate; import java.util.ArrayList; @@ -28,6 +30,7 @@ import java.util.stream.Collectors; * @date 2020/8/18 10:21 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class IndexServiceImpl implements IndexService { @Autowired @@ -36,6 +39,8 @@ public class IndexServiceImpl implements IndexService { private ScreenIndexDataMonthlyDao screenIndexDataMonthlyDao; @Autowired private PartyMemberLeadServiceImpl partyMemberLeadServiceImpl; + @Autowired + private DateUtils dateUtils; /** * @Description 1、年度平均指数 @@ -43,7 +48,7 @@ public class IndexServiceImpl implements IndexService { * @author zxc * @date 2020/8/19 2:53 下午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public YearAverageIndexResultDTO yearAverageIndex(YearAverageIndexFormDTO yearAverageIndexFormDTO) { YearAverageIndexResultDTO yearAverageIndexResultDTO = screenIndexDataYearlyDao.selectYearAverageIndex(yearAverageIndexFormDTO.getAgencyId()); @@ -59,10 +64,19 @@ public class IndexServiceImpl implements IndexService { * @author zxc * @date 2020/8/19 3:17 下午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO) { - MonthPieChartResultDTO monthPieChartResultDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId()); + + MonthPieChartResultDTO monthPieChartResultDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(),null); + String monthId = dateUtils.getCurrentMonthId(); + int time = NumConstant.TWELVE; + //保证获取月度指数数据的最大可能性 + while(null == monthPieChartResultDTO && time > NumConstant.ONE){ + time--; + monthId = dateUtils.getPreviousMonthIdByDest(null,monthId); + monthPieChartResultDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(),monthId); + } if (null == monthPieChartResultDTO){ return new MonthPieChartResultDTO(); } @@ -75,7 +89,7 @@ public class IndexServiceImpl implements IndexService { * @author zxc * @date 2020/8/19 5:27 下午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public MonthBarchartResultDTO monthBarchart(MonthBarchartFormDTO monthBarchartFormDTO) { MonthBarchartResultDTO result = new MonthBarchartResultDTO(); @@ -85,7 +99,7 @@ public class IndexServiceImpl implements IndexService { List totalIndexData = new ArrayList<>(); // 1. x轴 result.setXAxis(partyMemberLeadServiceImpl.getXPro()); - // 2. 查询近一年的指数值【不包括本月】 + // 2. 查询近一年的指数值【包括本月】 List monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(monthBarchartFormDTO.getAgencyId()); if (monthBarchartResults.size() == NumConstant.ZERO){ for (int i = NumConstant.ZERO; i <= NumConstant.TWELVE; i++) { @@ -101,12 +115,48 @@ public class IndexServiceImpl implements IndexService { return result; } List collect = monthBarchartResults.stream().sorted(Comparator.comparing(MonthBarchartResult::getMonthId)).collect(Collectors.toList()); - collect.forEach(month -> { + //升序 当前月份在队尾 + List _ymList = dateUtils.getXpro().keySet().stream().collect(Collectors.toList()); + //针对集合collect的游标 + int cursor = NumConstant.ZERO; + //针对X轴,数据集合不全则进行数据填充 + a:for(int i = NumConstant.ZERO; i < _ymList.size(); i++){ + //这里的collect必须是有序且升序的 + if(cursor >= collect.size()) break a; + //如果存在过期数据,即从数据库中查询出超出横坐标左边界的月份值 + if(Integer.parseInt(collect.get(cursor).getMonthId()) < Integer.parseInt(_ymList.get(NumConstant.ZERO))) { + //控制当前循环重复进行 + i--; + //忽略过期数据 + cursor++; + continue ; + } + if(!StringUtils.equals(collect.get(cursor).getMonthId(),_ymList.get(i))){ + //SET DEFAULT + serviceAbilityData.add(NumConstant.ZERO_DOT_ZERO); + partyDevAbilityData.add(NumConstant.ZERO_DOT_ZERO); + governAbilityData.add(NumConstant.ZERO_DOT_ZERO); + totalIndexData.add(NumConstant.ZERO_DOT_ZERO); + //保持cursor不变 + }else{ + MonthBarchartResult data = collect.get(cursor); + //SET DATA + serviceAbilityData.add(null == data.getServiceAbility() ? NumConstant.ZERO_DOT_ZERO : data.getServiceAbility()); + partyDevAbilityData.add(null == data.getPartyDevAbility() ? NumConstant.ZERO_DOT_ZERO : data.getPartyDevAbility()); + governAbilityData.add(null == data.getGovernAbility() ? NumConstant.ZERO_DOT_ZERO : data.getGovernAbility()); + totalIndexData.add(null == data.getIndexTotal() ? NumConstant.ZERO_DOT_ZERO : data.getIndexTotal()); + //统计日期一致后移动游标 + cursor++; + } + + } + + /*collect.forEach(month -> { serviceAbilityData.add(null == month.getServiceAbility() ? NumConstant.ZERO_DOT_ZERO : month.getServiceAbility()); partyDevAbilityData.add(null == month.getPartyDevAbility() ? NumConstant.ZERO_DOT_ZERO : month.getPartyDevAbility()); governAbilityData.add(null == month.getGovernAbility() ? NumConstant.ZERO_DOT_ZERO : month.getGovernAbility()); totalIndexData.add(null == month.getIndexTotal() ? NumConstant.ZERO_DOT_ZERO : month.getIndexTotal()); - }); + });*/ result.setServiceAbilityData(serviceAbilityData); result.setPartyDevAbilityData(partyDevAbilityData); result.setGovernAbilityData(governAbilityData); @@ -120,14 +170,14 @@ public class IndexServiceImpl implements IndexService { * @author zxc * @date 2020/8/20 10:04 上午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public List subAgencyIndexRank(SubAgencyIndexRankFormDTO subAgencyIndexRankFormDTO) { LocalDate now = LocalDate.now().minusMonths(NumConstant.ONE); int yearId = now.getYear(); subAgencyIndexRankFormDTO.setYearId(String.valueOf(yearId)); List subAgencyIndexRankResultDTOS = screenIndexDataMonthlyDao.selectSubAgencyIndexRank(subAgencyIndexRankFormDTO); - if (subAgencyIndexRankResultDTOS.size() == NumConstant.ZERO){ + if (CollectionUtils.isEmpty(subAgencyIndexRankResultDTOS)){ return new ArrayList<>(); } return subAgencyIndexRankResultDTOS; diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java similarity index 80% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java index b895b49651..61fe56778d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/PartyMemberLeadServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/PartyMemberLeadServiceImpl.java @@ -1,32 +1,28 @@ -package com.epmet.datareport.service.screen.impl; +package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.constant.DataSourceConstant; -import com.epmet.datareport.dao.screen.ScreenOrgRankDataDao; -import com.epmet.datareport.dao.screen.ScreenPartyBranchDataDao; -import com.epmet.datareport.dao.screen.ScreenPartyLinkMassesDataDao; -import com.epmet.datareport.dao.screen.ScreenPioneerDataDao; -import com.epmet.datareport.dao.screen.ScreenPartyUserRankDataDao; -import com.epmet.datareport.service.screen.PartyMemberLeadService; +import com.epmet.datareport.dao.evaluationindex.screen.*; +import com.epmet.datareport.service.evaluationindex.screen.PartyMemberLeadService; import com.epmet.datareport.utils.DateUtils; import com.epmet.datareport.utils.ModuleConstant; -import com.epmet.screen.dto.form.AgencyAndNumFormDTO; -import com.epmet.screen.dto.form.ContactMassLineChartFormDTO; -import com.epmet.screen.dto.form.FineExampleFormDTO; -import com.epmet.screen.dto.form.VolunteerServiceFormDTO; -import com.epmet.screen.dto.result.*; -import com.epmet.screen.constant.*; +import com.epmet.evaluationindex.screen.constant.ScreenConstant; +import com.epmet.evaluationindex.screen.dto.form.AgencyAndNumFormDTO; +import com.epmet.evaluationindex.screen.dto.form.ContactMassLineChartFormDTO; +import com.epmet.evaluationindex.screen.dto.form.FineExampleFormDTO; +import com.epmet.evaluationindex.screen.dto.form.VolunteerServiceFormDTO; +import com.epmet.evaluationindex.screen.dto.result.*; import com.github.pagehelper.PageHelper; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import java.math.BigDecimal; import java.time.LocalDate; import java.util.*; -import java.util.stream.Collectors; /** * 党建引领相关各指标查询 @@ -35,6 +31,7 @@ import java.util.stream.Collectors; * @date 2020/8/18 10:22 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { @Autowired @@ -56,7 +53,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { * @author zxc * @date 2020/8/20 1:56 下午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public FineExampleResultDTO fineExample(FineExampleFormDTO fineExampleFormDTO) { FineExampleResultDTO fineExampleResultDTO = screenPioneerDataDao.selectFineExample(fineExampleFormDTO.getAgencyId()); @@ -88,7 +85,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { * @author zxc * @date 2020/8/20 2:35 下午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public ContactMassLineChartResultDTO contactMassLineChart(ContactMassLineChartFormDTO contactMassLineChartFormDTO) { ContactMassLineChartResultDTO result = new ContactMassLineChartResultDTO(); @@ -121,7 +118,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { * @author zxc * @date 2020/8/20 3:19 下午 */ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public VolunteerServiceResultDTO volunteerService(VolunteerServiceFormDTO volunteerServiceFormDTO) { VolunteerServiceResultDTO result = new VolunteerServiceResultDTO(); @@ -154,38 +151,35 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { Optional opt = volunteerServiceResults.stream() .filter(obj -> StringUtils.equals(mm,obj.getMonthId())).findAny(); VolunteerServiceResult find = opt.isPresent() ? opt.get() : defaultObj; - //VolunteerServiceResult find = Optional.ofNullable(opt.isPresent() ? opt.get() : null).orElse(defaultObj); organizeData.add(find.getOrganizeData()); joinData.add(find.getJoinData()); averageJoinUserData.add(find.getAverageJoinUserData()); }); - /* - List collect = volunteerServiceResults.stream().sorted(Comparator.comparing(VolunteerServiceResult::getMonthId)).collect(Collectors.toList()); - collect.forEach(volunteer -> { - organizeData.add(volunteer.getOrganizeData()); - joinData.add(volunteer.getJoinData()); - averageJoinUserData.add(volunteer.getAverageJoinUserData()); - }); - */ - - result.setOrganizeData(organizeData); result.setJoinData(joinData); result.setAverageJoinUserData(averageJoinUserData); String bottomMonthId = yyyyMMList.iterator().next(); //总组织次数 Integer totalOrganizationCount = screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,volunteerServiceFormDTO.getAgencyId(),bottomMonthId); + //自旋一次 + totalOrganizationCount = Optional.ofNullable(totalOrganizationCount).orElse( + screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_ORGAN,volunteerServiceFormDTO.getAgencyId(),dateUtils.getPreviousMonthIdByDest(null,bottomMonthId)) + ); //总参与人数 Integer totalJoinUserCount = screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_JOIN,volunteerServiceFormDTO.getAgencyId(),bottomMonthId); + //自旋一次 + totalJoinUserCount = Optional.ofNullable(totalJoinUserCount).orElse( + screenPartyBranchDataDao.selectTotalOrganizationCount(ModuleConstant.KEY_BRANCH_CATEGORY_VOLUNTARY_SERVICE,ModuleConstant.PARAM_BRANCH_DATA_TYPE_JOIN,volunteerServiceFormDTO.getAgencyId(),dateUtils.getPreviousMonthIdByDest(null,bottomMonthId)) + ); result.setTotalOrganizationCount(null == totalOrganizationCount ? NumConstant.ZERO : totalOrganizationCount); result.setTotalJoinUserCount(null == totalJoinUserCount ? NumConstant.ZERO : totalJoinUserCount); return result; } /** - * @Description 获取之前的12个月份【不包括当前月】 + * @Description 获取之前的12个月份【包括当前月】 * @author zxc * @date 2020/8/21 10:19 上午 */ @@ -200,6 +194,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { return xAxis; } + /** * @Description 4、先进排行榜单-先进支部排行 * @NEI https://nei.netease.com/interface/detail/req/?pid=57068&id=321539 @@ -208,7 +203,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { * @author wangc * @date 2020.08.21 11:05 **/ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public List advancedBranchRank(AgencyAndNumFormDTO param) { if(null == param.getTopNum()){ @@ -217,8 +212,15 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { param.setTopNum(NumConstant.MAX); } PageHelper.startPage(NumConstant.ONE,param.getTopNum()); + String monthId = dateUtils.getCurrentMonthId(); List gridData = - screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),dateUtils.getCurrentMonthId()); + screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId); + int time = NumConstant.TWELVE; + while(CollectionUtils.isEmpty(gridData) && time > NumConstant.ONE){ + time--; + monthId = dateUtils.getPreviousMonthIdByDest(null,monthId); + gridData = screenOrgRankDataDao.selectGridDataMonthly(param.getAgencyId(),monthId); + } List result = new LinkedList<>(); if(null == gridData || gridData.isEmpty()) return result; gridData.forEach( data -> { @@ -239,7 +241,7 @@ public class PartyMemberLeadServiceImpl implements PartyMemberLeadService { * @author wangc * @date 2020.08.21 14:22 **/ - @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true) @Override public List advancedPartymemberRank(AgencyAndNumFormDTO param) { if(null == param.getTopNum()) param.setTopNum(NumConstant.TEN); diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ScreenProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java similarity index 68% rename from epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ScreenProjectServiceImpl.java rename to epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java index e617449458..2cf288cae9 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/screen/impl/ScreenProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java @@ -1,12 +1,12 @@ -package com.epmet.datareport.service.screen.impl; +package com.epmet.datareport.service.evaluationindex.screen.impl; import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.constant.DataSourceConstant; -import com.epmet.datareport.dao.screen.ScreenEventDataDao; -import com.epmet.datareport.dao.screen.ScreenEventImgDataDao; -import com.epmet.datareport.service.screen.ScreenProjectService; -import com.epmet.screen.dto.form.ProjectDetailFormDTO; -import com.epmet.screen.dto.result.ProjectDetailResultDTO; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenEventDataDao; +import com.epmet.datareport.dao.evaluationindex.screen.ScreenEventImgDataDao; +import com.epmet.datareport.service.evaluationindex.screen.ScreenProjectService; +import com.epmet.evaluationindex.screen.dto.form.ProjectDetailFormDTO; +import com.epmet.evaluationindex.screen.dto.result.ProjectDetailResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -19,6 +19,7 @@ import java.util.List; * @date 2020/8/18 10:23 */ @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class ScreenProjectServiceImpl implements ScreenProjectService { @Autowired @@ -32,7 +33,7 @@ public class ScreenProjectServiceImpl implements ScreenProjectService { * @author zxc * @date 2020/8/19 4:36 下午 */ - @DataSource(value = DataSourceConstant.STATS, datasourceNameFromArg = true) + @DataSource(value = DataSourceConstant.EVALUATION_INDEX, datasourceNameFromArg = true) @Override public ProjectDetailResultDTO projectDetail(ProjectDetailFormDTO projectDetailFormDTO) { ProjectDetailResultDTO projectDetailResultDTO = screenEventDataDao.selectEventDetail(projectDetailFormDTO.getProjectId(),projectDetailFormDTO.getAgencyId()); diff --git a/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml b/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml index 44b522b30b..5899ead6dd 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml @@ -104,6 +104,11 @@ dynamic: url: @datasource.druid.statsdisplay.url@ username: @datasource.druid.statsdisplay.username@ password: @datasource.druid.statsdisplay.password@ + evaluationIndex: + driver-class-name: com.mysql.cj.jdbc.Driver + url: @datasource.druid.evaluationIndex.url@ + username: @datasource.druid.evaluationIndex.username@ + password: @datasource.druid.evaluationIndex.password@ feign: hystrix: diff --git a/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml b/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml index ea81aca726..793be083a1 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/logback-spring.xml @@ -149,7 +149,7 @@ - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml index ef851d6a08..fa89221e37 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCpcBaseDataDao.xml @@ -1,10 +1,10 @@ - + - + SELECT SUM( AGE_LEVEL_1 ) + SUM( AGE_LEVEL_2 ) AS under30Count, SUM( AGE_LEVEL_3 ) + SUM( AGE_LEVEL_4 ) AS between31And50Count, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml index f66aef3609..22a62be6d0 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerAgencyDao.xml @@ -1,10 +1,10 @@ - + - + SELECT agency_name AS label, agency_id AS value, @@ -20,7 +20,7 @@ - + SELECT agency_id AS value, agency_name AS label, @@ -37,7 +37,7 @@ - + SELECT agency_id AS agencyId, agency_name AS name, @@ -51,7 +51,7 @@ - + SELECT agency_id AS subId, agency_name AS subName, @@ -66,7 +66,7 @@ - + SELECT sutd.org_id AS subId, sca.center_mark AS centerMark, @@ -84,7 +84,7 @@ - + SELECT sutd.org_id AS subId, sca.center_mark AS centerMark, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml index 58e2171c3d..cf939d024a 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerDeptDao.xml @@ -1,7 +1,7 @@ - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml index 01d3f4da7d..6cafd96036 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml @@ -1,10 +1,10 @@ - + - + SELECT grid_id AS subId, grid_name AS subName, @@ -19,7 +19,7 @@ - + SELECT grid_id AS gridId, grid_name AS gridName, @@ -32,7 +32,7 @@ - + SELECT sutd.org_id AS subId, scg.center_mark AS centerMark, @@ -50,7 +50,7 @@ - + SELECT sutd.org_id AS subId, scg.center_mark AS centerMark, @@ -68,7 +68,7 @@ - + SELECT grid_id AS value, grid_name AS label, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml index 630befedcd..0bb479ed65 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenDifficultyDataDao.xml @@ -1,10 +1,10 @@ - + - + SELECT diff.EVENT_ID AS projectId, diff.EVENT_CONTENT AS title, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml index 750439bb3e..b877ad611d 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventDataDao.xml @@ -1,10 +1,10 @@ - + - + SELECT IFNULL(event_title,'') AS projectTitle, event_level AS color, @@ -20,7 +20,7 @@ - + SELECT event_content AS projectContent, event_status_desc AS STATUS, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml index e5e3e636af..ef20677ece 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenEventImgDataDao.xml @@ -1,7 +1,7 @@ - + diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml index a453f09e54..7976de7ff1 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml @@ -1,10 +1,10 @@ - + - + SELECT ORG_NAME AS agencyName, RESPONSE_RATIO, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 3adcde64e8..37f45b8084 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -1,10 +1,10 @@ - + - + SELECT service_ablity AS serviceAbility, party_dev_ablity AS partyDevAbility, @@ -15,11 +15,19 @@ del_flag = '0' AND org_type = 'agency' AND org_id = #{agencyId} - AND month_id = DATE_FORMAT(NOW(),'%Y%m') + + + AND month_id = DATE_FORMAT(NOW(),'%Y%m') + + + AND month_id = #{monthId} + + + - - + + SELECT month_id AS monthId, service_ablity AS serviceAbility, @@ -36,7 +44,7 @@ - + SELECT org_name AS NAME, index_total AS totalIndex, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml index 3d9329846d..d224b92d4e 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml @@ -1,10 +1,10 @@ - + - + SELECT index_total AS yearAverageIndex, service_ablity AS serviceAbility, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml index 97292b4797..310320029e 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataDao.xml @@ -1,10 +1,10 @@ - + - + SELECT ORG_NAME AS NAME, PARTY_TOTAL AS partyMemberNum, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml index 2b20c44880..0ee2a6a315 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyBranchDataDao.xml @@ -1,7 +1,7 @@ - + @@ -17,7 +17,7 @@ - + SELECT MONTH_ID, MEET_CATEGORY_NAME AS issue, @@ -38,7 +38,7 @@ - + SELECT ORG_NAME, SUM( ORGANIZE_COUNT ) AS organizeData , @@ -69,7 +69,7 @@ - + SELECT month_id AS monthId, SUM(organize_count) AS organizeData, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml index 5643b1e31b..2bbdece16c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyLinkMassesDataDao.xml @@ -1,10 +1,10 @@ - + - + SELECT org_name AS orgName, create_group_total AS groupTotal, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml index 80aee4ece5..8d865b6341 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml @@ -1,10 +1,10 @@ - + - + SELECT concat( surname, CASE char_length( NAME ) WHEN 1 THEN '*' WHEN 2 THEN '**' ELSE '***' END ) AS name, point_total AS point @@ -21,7 +21,7 @@ - + SELECT USER_ID, concat( surname, CASE char_length( NAME ) WHEN 1 THEN '*' WHEN 2 THEN '**' ELSE '***' END ) AS name, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml index 5e509c8329..992c347f9b 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPioneerDataDao.xml @@ -1,10 +1,10 @@ - + - + SELECT issue_total AS issueTotal, issue_ratio AS issueRatioA, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml index ff931885f6..1a94210725 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPublicPartiTotalDataDao.xml @@ -1,10 +1,10 @@ - + - + SELECT ORG_NAME AS NAME, REG_USER_TOTAL AS regNum, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml index 2fe2eb4337..cbbc5fe211 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserJoinDao.xml @@ -1,10 +1,10 @@ - + - + SELECT JOIN_TOTAL AS total, AVG_JOIN AS averageJoin, @@ -25,7 +25,7 @@ - + /* SELECT MONTH_ID, diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml index 84e00a0f5d..57b2959430 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml @@ -1,10 +1,10 @@ - + - + SELECT SUM( PARTY_TOTAL ) AS partyMemberTotal, SUM( USER_TOTAL ) AS platFormTotal @@ -16,7 +16,7 @@ - + SELECT user_total AS userNum, party_total AS partyMemberNum, @@ -46,7 +46,7 @@ - + SELECT ORG_NAME AS NAME, REG_USER_TOTAL AS regNum, diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java index be529605de..f89ede1ba6 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/DataSourceConstant.java @@ -11,5 +11,6 @@ public interface DataSourceConstant { String OPER_CRM = "operCrm"; String RESI_GROUP = "resiGroup"; String EPMET_USER = "epmetuser"; + String EVALUATION_INDEX = "evaluationIndex"; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index 12b5c2a136..defe8225fd 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -21,17 +21,28 @@ public interface IndexCalConstant { String USER_ID="USER_ID"; String YEAR_ID = "YEAR_ID"; - String COMMUNITY_GOVERN = "zhilinengli"; + String COMMUNITY_LEVEL = "community"; - String COMMUNITY_PARTY = "dangjiannengli"; + String STREET_LEVEL = "street"; - String COMMUNITY_SERVICE = "fuwunengli"; + String COMMUNITY_RELATE = "shequxiangguan"; - String COMMUNITY_SERVICE_AVG = "shequxiajisywgfwnldfpjz"; - String COMMUNITY_GOVERN_AVG = "shequxiashusywgzlnlhzpyz"; - String COMMUNITY_PARTY_AVG = "xiazhusuoyouwgddjnlpjz"; - String COMMUNITY_RELATE = "shequxiangguan"; + // 测试插入数据用 + String customerId="b09527201c4409e19d1dbc5e3c3429a1"; + //社区S1-C1 + String SHE_QU_S1_C1="S1-C1"; + //社区S1-C2 + String SHE_QU_S1_C2="S1-C2"; + //网格S1-C1-G1 + String S1_C1_G1="S1-C1-G1"; + //网格S1-C1-G2 + String S1_C1_G2="S1-C1-G2"; + //网格S1-C2-G1 + String S1_C2_G1="S1-C2-G1"; + + String monthId="202008"; + String insertUser="yinzuomei"; } diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java new file mode 100644 index 0000000000..a9abd3411f --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/AgencyScoreDTO.java @@ -0,0 +1,135 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.indexcal; + +import java.io.Serializable; +import java.util.Date; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.IndexCalConstant; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +public class AgencyScoreDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织id(eg:社区或者街道id) + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentAgencyId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan + */ + private String indexCode; + + /** + * 数据类型 district :全区;street:街道 + */ + private String dataType; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + public AgencyScoreDTO() { + this.isTotal = NumConstant.ZERO_STR; + this.score = new BigDecimal(NumConstant.ZERO); + this.indexCode = ""; + this.dataType = IndexCalConstant.STREET_LEVEL; + this.delFlag = 0; + this.revision = 0; + this.createdBy = "APP_USER"; + this.updatedBy = "APP_USER"; + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java index 4c43a57890..187f69c960 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java @@ -23,6 +23,10 @@ public class CalculateCommonFormDTO implements Serializable { */ private String customerId; + public CalculateCommonFormDTO() { + super(); + } + public CalculateCommonFormDTO(String customerId, String monthId) { this.monthId=monthId; this.customerId=customerId; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java new file mode 100644 index 0000000000..5051aa3d82 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java @@ -0,0 +1,117 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.indexcal; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +public class DeptScoreDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 部门id + */ + private String deptId; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 治理能力:zhilinengli; + */ + private String indexCode; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityPartyAvgResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityPartyAvgResultDTO.java new file mode 100644 index 0000000000..997b9fed0b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityPartyAvgResultDTO.java @@ -0,0 +1,51 @@ +package com.epmet.dto.indexcal; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Author zxc + * @DateTime 2020/9/2 4:28 下午 + */ +@Data +public class SubCommunityPartyAvgResultDTO implements Serializable { + + private static final long serialVersionUID = -6439835738195045820L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 客户ID + */ + private String customerId; + + /** + * 上级组织ID + */ + private String parentId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 分数 + */ + private BigDecimal score; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java index 50cc040c44..b35ca1537a 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java @@ -40,11 +40,6 @@ public class DeptGovrnAbilityFormDTO implements Serializable { */ private String yearId; - /** - * allRegion:全区;community:社区;street:街道 - */ - private String dataType; - /** * 区直部门被吹哨次数 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java index ef4efd6a24..021533fe59 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java @@ -73,7 +73,7 @@ public class GridGovrnAbilityFormDTO implements Serializable { /** * 网格议题转项目率 */ - private BigDecimal avgShiftProjectRatio; + private BigDecimal issueToProjectRatio; /** * 网格自治项目数 统计期网格自身内办结的项目数目 diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java index 7ddb9e785a..1534955c75 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java @@ -41,7 +41,7 @@ public class OrgGovrnAbilityFormDTO implements Serializable { private String yearId; /** - * allRegion:全区;community:社区;street:街道 + * district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java index e5ad40ef3f..cc1401d424 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java @@ -41,7 +41,7 @@ public class OrgPartyAbilityFormDTO implements Serializable { private String yearId; /** - * allRegion:全区;community:社区;street:街道 + * district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java index 6ef48c6fa4..59050bced2 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java @@ -41,7 +41,7 @@ public class OrgServiceAbilityFormDTO implements Serializable { private String yearId; /** - * allRegion:全区;community:社区;street:街道 + * district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 2b42004dfa..b44b6f2e17 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -189,6 +189,12 @@ epmet_data_stats_display_user EpmEt-db-UsEr + + + + epmet_evaluation_index_user + EpmEt-db-UsEr + 0 192.168.1.130 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 2b88f53f42..e92d93a3b6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -1,14 +1,24 @@ package com.epmet.controller; -import com.baomidou.mybatisplus.extension.api.R; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.AgencySubTreeDto; import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import com.epmet.entity.stats.DimAgencyEntity; import com.epmet.service.StatsDemoService; -import com.epmet.service.indexcal.GridCorreLationService; -import com.epmet.service.screen.IndexCalculateCommunityService; +import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; import com.epmet.service.stats.DimAgencyService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -17,6 +27,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.List; import java.util.concurrent.ExecutionException; @@ -27,7 +38,6 @@ import java.util.concurrent.Future; @RestController @Slf4j public class DemoController { - @Autowired private StatsDemoService demoService; @@ -117,36 +127,319 @@ public class DemoController { return new Result().ok(list); } - @PostMapping("zxc") - public Result getZxc(){ -// indexCalculateCommunityService.communityPublishArticleCountCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); - indexCalculateCommunityService.communityGovernAbilityCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); + @PostMapping("zxc2") + public Result getZxc2(){ + indexCalculateCommunityService.calCommunityAll("b09527201c4409e19d1dbc5e3c3429a1","202008"); return new Result(); } - @PostMapping("zxc1") - public Result getZxc1(){ - indexCalculateCommunityService.communityPartyCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); + @PostMapping("testcalculategridcorrelation") + public Result testcalculateGridCorreLation(){ + CalculateCommonFormDTO formDTO=new CalculateCommonFormDTO("b09527201c4409e19d1dbc5e3c3429a1","202008"); + gridCorreLationService.calculateGridCorreLation(formDTO); return new Result(); } - @PostMapping("zxc2") - public Result getZxc2(){ - indexCalculateCommunityService.communityServiceAbilityCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); + @Autowired + private GridScoreDao gridScoreDao; + @Autowired + private FactIndexPartyAblityGridMonthlyDao factIndexPartyAblityGridMonthlyDao; + @Autowired + private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; + @Autowired + private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao; + @Autowired + private ScreenCustomerGridDao screenCustomerGridDao; +// private static Integer testcal=100; + + @PostMapping("testcal") + public Result testCal(){ + CalculateCommonFormDTO formDTO=new CalculateCommonFormDTO("b09527201c4409e19d1dbc5e3c3429a1","202008"); +// //查询总记录数 +// List gridScoreDTOList=gridScoreDao.selectList(formDTO); +// return new Result>().ok(gridScoreDTOList); + gridCorreLationService.calculateGridCorreLation(formDTO); return new Result(); } - @PostMapping("zxcAll") - public Result getZxcAll(){ - indexCalculateCommunityService.communityRelate("b09527201c4409e19d1dbc5e3c3429a1","202008"); + @PostMapping("insertgridinfo") + public Result insertScreenCustomerGrid(){ + ScreenCustomerGridEntity entity1=new ScreenCustomerGridEntity(); + entity1.setCustomerId(IndexCalConstant.customerId); + entity1.setGridId(IndexCalConstant.S1_C1_G1); + entity1.setGridName("网格S1-C1-G1"); + entity1.setParentAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity1.setAllParentIds("S1,C1"); + entity1.setCreatedBy(IndexCalConstant.insertUser); + entity1.setUpdatedBy(IndexCalConstant.insertUser); + entity1.setDataEndTime("20200901"); + screenCustomerGridDao.insert(entity1); + + ScreenCustomerGridEntity entity2=new ScreenCustomerGridEntity(); + entity2.setCustomerId(IndexCalConstant.customerId); + entity2.setGridId(IndexCalConstant.S1_C1_G2); + entity2.setGridName("网格S1-C1-G2"); + entity2.setParentAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity2.setAllParentIds("S1,C1"); + entity2.setCreatedBy(IndexCalConstant.insertUser); + entity2.setUpdatedBy(IndexCalConstant.insertUser); + entity2.setDataEndTime("20200901"); + screenCustomerGridDao.insert(entity2); + + ScreenCustomerGridEntity entity3=new ScreenCustomerGridEntity(); + entity3.setCustomerId(IndexCalConstant.customerId); + entity3.setGridId(IndexCalConstant.S1_C2_G1); + entity3.setGridName("网格S1-C2-G1"); + entity3.setParentAgencyId(IndexCalConstant.SHE_QU_S1_C2); + entity3.setAllParentIds("S1,C2"); + entity3.setCreatedBy(IndexCalConstant.insertUser); + entity3.setUpdatedBy(IndexCalConstant.insertUser); + entity3.setDataEndTime("20200901"); + screenCustomerGridDao.insert(entity3); + return new Result(); } + @PostMapping("inserttestdata") + public Result test(){ + //网格相关-党建能力 + FactIndexPartyAblityGridMonthlyEntity entity1=this.getPartyAblityGridMonthlyEntity1(); + factIndexPartyAblityGridMonthlyDao.insert(entity1); + FactIndexPartyAblityGridMonthlyEntity entity2=this.getPartyAblityGridMonthlyEntity2(); + factIndexPartyAblityGridMonthlyDao.insert(entity2); + FactIndexPartyAblityGridMonthlyEntity entity3=this.getPartyAblityGridMonthlyEntity3(); + factIndexPartyAblityGridMonthlyDao.insert(entity3); + + //网格相关-治理能力 + FactIndexGovrnAblityGridMonthlyEntity zhiliEntity1=this.getGovrnAblityGridMonthlyEntity1(); + factIndexGovrnAblityGridMonthlyDao.insert(zhiliEntity1); + FactIndexGovrnAblityGridMonthlyEntity zhiliEntity2=this.getGovrnAblityGridMonthlyEntity2(); + factIndexGovrnAblityGridMonthlyDao.insert(zhiliEntity2); + FactIndexGovrnAblityGridMonthlyEntity zhiliEntity3=this.getGovrnAblityGridMonthlyEntity3(); + factIndexGovrnAblityGridMonthlyDao.insert(zhiliEntity3); + + //网格相关-服务能力 + FactIndexServiceAblityGridMonthlyEntity fuwuEntity1=this.getServiceAblityGridMonthlyEntity1(); + factIndexServiceAblityGridMonthlyDao.insert(fuwuEntity1); + FactIndexServiceAblityGridMonthlyEntity fuwuEntity2=this.getServiceAblityGridMonthlyEntity2(); + factIndexServiceAblityGridMonthlyDao.insert(fuwuEntity2); + FactIndexServiceAblityGridMonthlyEntity fuwuEntity3=this.getServiceAblityGridMonthlyEntity3(); + factIndexServiceAblityGridMonthlyDao.insert(fuwuEntity3); - @PostMapping("testcalculategridcorrelation") - public Result testcalculateGridCorreLation(){ - CalculateCommonFormDTO formDTO=new CalculateCommonFormDTO("b09527201c4409e19d1dbc5e3c3429a1","202008"); - gridCorreLationService.calculateGridCorreLation(formDTO); return new Result(); } + //网格相关-党建能力-网格1 + private FactIndexPartyAblityGridMonthlyEntity getPartyAblityGridMonthlyEntity1() { + FactIndexPartyAblityGridMonthlyEntity entity1=new FactIndexPartyAblityGridMonthlyEntity(); + entity1.setCustomerId(IndexCalConstant.customerId); + entity1.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity1.setGridId(IndexCalConstant.S1_C1_G1); + entity1.setMonthId(IndexCalConstant.monthId); + entity1.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity1.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity1.setUserCount(10); // 网格群众用户数 + entity1.setPartyCount(50); // 网格党员用户数 + entity1.setActiveUserCount(100); // 网格活跃群众用户数 + entity1.setActivePartyCount(80); //网格活跃党员用户数 + entity1.setPartyAvgTopicCount(30); //网格党员人均提出话题数 + entity1.setUserAvgTopicCount(10); //网格群众人均提出话题数 + entity1.setPartyAvgShiftProjectCount(50); //网格党员人均提出的议题转项目数 + entity1.setUserAvgShiftProjectCount(50); //网格群众人均提出的议题转项目数 + entity1.setCreateGroupPartyCount(35); //建群党员数(累计值) 去重 + entity1.setPublishArticleCount(35); //网格发文数 + entity1.setIssueToProjectRatio(new BigDecimal("50")); //网格议题转项目率 + entity1.setCreateThreeMeetsCount(10); //组织三会一课次数 + entity1.setJoinThreeMeetsCount(30); //党员参加三会一课人次 + + entity1.setCreatedBy(IndexCalConstant.insertUser); + entity1.setUpdatedBy(IndexCalConstant.insertUser); + return entity1; + } + + //网格相关-党建能力-网格2 + private FactIndexPartyAblityGridMonthlyEntity getPartyAblityGridMonthlyEntity2() { + FactIndexPartyAblityGridMonthlyEntity entity2=new FactIndexPartyAblityGridMonthlyEntity(); + entity2.setCustomerId(IndexCalConstant.customerId); + entity2.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity2.setGridId(IndexCalConstant.S1_C1_G2); + entity2.setMonthId(IndexCalConstant.monthId); + entity2.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity2.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity2.setUserCount(20); // 网格群众用户数 + entity2.setPartyCount(30); // 网格党员用户数 + entity2.setActiveUserCount(20); // 网格活跃群众用户数 + entity2.setActivePartyCount(20); //网格活跃党员用户数 + entity2.setPartyAvgTopicCount(10); //网格党员人均提出话题数 + entity2.setUserAvgTopicCount(50); //网格群众人均提出话题数 + entity2.setPartyAvgShiftProjectCount(35); //网格党员人均提出的议题转项目数 + entity2.setUserAvgShiftProjectCount(55); //网格群众人均提出的议题转项目数 + entity2.setCreateGroupPartyCount(30); //建群党员数(累计值) 去重 + entity2.setPublishArticleCount(30); //网格发文数 + entity2.setIssueToProjectRatio(new BigDecimal("30")); //网格议题转项目率 + entity2.setCreateThreeMeetsCount(25); //组织三会一课次数 + entity2.setJoinThreeMeetsCount(20); //党员参加三会一课人次 + + entity2.setCreatedBy(IndexCalConstant.insertUser); + entity2.setUpdatedBy(IndexCalConstant.insertUser); + return entity2; + } + //网格相关-党建能力-网格3 + private FactIndexPartyAblityGridMonthlyEntity getPartyAblityGridMonthlyEntity3() { + FactIndexPartyAblityGridMonthlyEntity entity3=new FactIndexPartyAblityGridMonthlyEntity(); + entity3.setCustomerId(IndexCalConstant.customerId); + entity3.setAgencyId(IndexCalConstant.SHE_QU_S1_C2); + entity3.setGridId(IndexCalConstant.S1_C2_G1); + entity3.setMonthId(IndexCalConstant.monthId); + entity3.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity3.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity3.setUserCount(60); // 网格群众用户数 + entity3.setPartyCount(80); // 网格党员用户数 + entity3.setActiveUserCount(70); // 网格活跃群众用户数 + entity3.setActivePartyCount(70); //网格活跃党员用户数 + entity3.setPartyAvgTopicCount(40); //网格党员人均提出话题数 + entity3.setUserAvgTopicCount(20); //网格群众人均提出话题数 + entity3.setPartyAvgShiftProjectCount(30); //网格党员人均提出的议题转项目数 + entity3.setUserAvgShiftProjectCount(30); //网格群众人均提出的议题转项目数 + entity3.setCreateGroupPartyCount(20); //建群党员数(累计值) 去重 + entity3.setPublishArticleCount(80); //网格发文数 + entity3.setIssueToProjectRatio(new BigDecimal("80")); //网格议题转项目率 + entity3.setCreateThreeMeetsCount(100); //组织三会一课次数 + entity3.setJoinThreeMeetsCount(100); //党员参加三会一课人次 + + entity3.setCreatedBy(IndexCalConstant.insertUser); + entity3.setUpdatedBy(IndexCalConstant.insertUser); + return entity3; + } + //网格相关-治理能力-网格1 + private FactIndexGovrnAblityGridMonthlyEntity getGovrnAblityGridMonthlyEntity1() { + FactIndexGovrnAblityGridMonthlyEntity entity=new FactIndexGovrnAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity.setGridId(IndexCalConstant.S1_C1_G1); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setIssueTotal(100); //网格总议题数 + entity.setAvgIssueCount(100); //网格人均议题数目 + entity.setIssueToProjectRatio(new BigDecimal("20")); //网格议题转项目率 + entity.setProjectTotal(20);// 网格总项目数 + entity.setSelfSolveProjectCount(10); // 网格自治项目数 统计期网格自身内办结的项目数目 + entity.setResolveProjectCount(100);//网格办结项目数 统计期内办结的项目数目 + entity.setTransferRightRatio(new BigDecimal("100"));//网格吹哨部门准确率 + entity.setSatisfactionRatio(new BigDecimal("100"));//网格内解决的项目的满意度 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + return entity; + } + + //网格相关-治理能力-网格2 + private FactIndexGovrnAblityGridMonthlyEntity getGovrnAblityGridMonthlyEntity2() { + FactIndexGovrnAblityGridMonthlyEntity entity=new FactIndexGovrnAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity.setGridId(IndexCalConstant.S1_C1_G2); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setIssueTotal(70); //网格总议题数 + entity.setAvgIssueCount(10); //网格人均议题数目 + entity.setIssueToProjectRatio(new BigDecimal("20")); //网格议题转项目率 + entity.setProjectTotal(40);// 网格总项目数 + entity.setSelfSolveProjectCount(15); // 网格自治项目数 统计期网格自身内办结的项目数目 + entity.setResolveProjectCount(20);//网格办结项目数 统计期内办结的项目数目 + entity.setTransferRightRatio(new BigDecimal("10"));//网格吹哨部门准确率 + entity.setSatisfactionRatio(new BigDecimal("70"));//网格内解决的项目的满意度 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + + return entity; + } + //网格相关-治理能力-网格3 + private FactIndexGovrnAblityGridMonthlyEntity getGovrnAblityGridMonthlyEntity3() { + FactIndexGovrnAblityGridMonthlyEntity entity=new FactIndexGovrnAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C2); + entity.setGridId(IndexCalConstant.S1_C2_G1); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setIssueTotal(80); //网格总议题数 + entity.setAvgIssueCount(70); //网格人均议题数目 + entity.setIssueToProjectRatio(new BigDecimal("100")); //网格议题转项目率 + entity.setProjectTotal(100);// 网格总项目数 + entity.setSelfSolveProjectCount(20); // 网格自治项目数 统计期网格自身内办结的项目数目 + entity.setResolveProjectCount(20);//网格办结项目数 统计期内办结的项目数目 + entity.setTransferRightRatio(new BigDecimal("70"));//网格吹哨部门准确率 + entity.setSatisfactionRatio(new BigDecimal("10"));//网格内解决的项目的满意度 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + + return entity; + } + + //网格相关-服务能力-网格1 + private FactIndexServiceAblityGridMonthlyEntity getServiceAblityGridMonthlyEntity1() { + FactIndexServiceAblityGridMonthlyEntity entity=new FactIndexServiceAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity.setGridId(IndexCalConstant.S1_C1_G1); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setActivityCount(80);//网格活动组织次数 爱心活动 + entity.setVolunteerRatio(new BigDecimal("70"));//网格志愿者占比 + entity.setPartyVolunteerRatio(new BigDecimal("60"));// 网格党员志愿者率 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + return entity; + } + + //网格相关-服务能力-网格2 + private FactIndexServiceAblityGridMonthlyEntity getServiceAblityGridMonthlyEntity2() { + FactIndexServiceAblityGridMonthlyEntity entity=new FactIndexServiceAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity.setGridId(IndexCalConstant.S1_C1_G2); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setActivityCount(40);//网格活动组织次数 爱心活动 + entity.setVolunteerRatio(new BigDecimal("30"));//网格志愿者占比 + entity.setPartyVolunteerRatio(new BigDecimal("80"));// 网格党员志愿者率 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + return entity; + } + + //网格相关-服务能力-网格3 + private FactIndexServiceAblityGridMonthlyEntity getServiceAblityGridMonthlyEntity3() { + FactIndexServiceAblityGridMonthlyEntity entity=new FactIndexServiceAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C2); + entity.setGridId(IndexCalConstant.S1_C2_G1); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setActivityCount(20);//网格活动组织次数 爱心活动 + entity.setVolunteerRatio(new BigDecimal("80"));//网格志愿者占比 + entity.setPartyVolunteerRatio(new BigDecimal("20"));// 网格党员志愿者率 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + return entity; + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java index 7c12fec411..eaa7c921b1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java @@ -4,7 +4,7 @@ import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.indexcollect.form.*; -import com.epmet.service.indexcollect.FactIndexCollectService; +import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java index 9dab47c148..978181b3a4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -1,17 +1,21 @@ package com.epmet.controller; -import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.screen.form.IndexCalculateForm; -import com.epmet.service.indexcal.CpcIndexCalculateService; -import com.epmet.service.screen.IndexCalculateService; +import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateService; +import com.epmet.util.DimIdGenerator; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.Date; + /** * 指标计算controller * @@ -23,33 +27,43 @@ import org.springframework.web.bind.annotation.RestController; public class IndexCalculateController { @Autowired - private IndexCalculateService indexCalculateService; - + private IndexCalculateService indexCalculateService; + @Autowired private CpcIndexCalculateService cpcIndexCalculateService; /** - * 1、按照客户计算指标(按照月份) + * 按照客户计算所有指标(按照月份) * - * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-20 **/ - @PostMapping("cpc") - public Result cpcIndexCalculate(ExternalAppRequestParam externalAppRequestParam, @RequestBody IndexCalculateForm formDTO) { - indexCalculateService.indexCalculate(formDTO); - return new Result(); + @PostMapping("all") + public Result indexCalculate(@RequestBody IndexCalculateForm formDTO) { + Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); + if (aBoolean){ + return new Result().ok(true); + } + return new Result().error("指标计算失败"); } - @PostMapping("getMax") - public Result getMax(){ - CalculateCommonFormDTO calculateCommonFormDTO = new CalculateCommonFormDTO("b09527201c4409e19d1dbc5e3c3429a1","202008"); - cpcIndexCalculateService.cpcIndexCalculate(calculateCommonFormDTO); - return new Result(); + + /** + * desc:计算党员指标分数 + * + * @return + */ + @PostMapping("cpc") + public Result cpc(@RequestBody CalculateCommonFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getMonthId())) { + //默认 当前月份-1 + formDTO.setMonthId(DimIdGenerator.getMonthDimId(DateUtils.addDateMonths(new Date(), -1))); + } + return new Result().ok(cpcIndexCalculateService.cpcIndexCalculate(formDTO)); } - /* *//** + /* *//** * 2、党建能力-网格相关指标上报(按照月份) * * @param externalAppRequestParam diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java index c26189717e..03deff604d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java @@ -8,10 +8,10 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.screen.form.InitCustomerIndexForm; import com.epmet.model.IndexExcelDataListener; import com.epmet.model.IndexModel; -import com.epmet.service.screen.IndexDictService; -import com.epmet.service.screen.IndexGroupDetailTemplateService; -import com.epmet.service.screen.IndexGroupService; -import com.epmet.service.screen.IndexGroupTemplateService; +import com.epmet.service.evaluationindex.screen.IndexDictService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailTemplateService; +import com.epmet.service.evaluationindex.screen.IndexGroupService; +import com.epmet.service.evaluationindex.screen.IndexGroupTemplateService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java index 60042f986b..99ba483433 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java @@ -4,7 +4,7 @@ import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.screencoll.form.*; -import com.epmet.service.screen.ScreenCollService; +import com.epmet.service.evaluationindex.screen.ScreenCollService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java new file mode 100644 index 0000000000..71f4f09bca --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Mapper +public interface AgencyScoreDao extends BaseDao { + + /** + * @Description 【街道】中间表插入 + * @param lists + * @author zxc + * @date 2020/8/27 5:05 下午 + */ + void insertStreetRecord(@Param("lists") List lists); + + /** + * @Description 删除旧记录 + * @param customerId + * @param monthId + * @param indexCode + * @author zxc + * @date 2020/9/2 15:47 + */ + void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("dataType")String dataType); + + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java index 2142128e3b..9c3d339ae8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexscore; +package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.entity.indexscore.CpcScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java new file mode 100644 index 0000000000..4f670bbfe2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Mapper +public interface DeptScoreDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java index 71316cf4f4..2e4a10cde2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java @@ -15,12 +15,12 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexscore; +package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.GridScoreDTO; -import com.epmet.entity.indexscore.GridScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java index f56638a3f6..5db8adb014 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java @@ -1,4 +1,4 @@ -package com.epmet.dao.indexcoll; /** +package com.epmet.dao.evaluationindex.indexcoll; /** * Copyright 2018 人人开源 https://www.renren.io * * This program is free software: you can redistribute it and/or modify @@ -18,7 +18,7 @@ package com.epmet.dao.indexcoll; /** import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.DeptGovrnAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java index b3002609d1..55d0e5730b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcollect.form.GridGovrnAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -91,8 +91,17 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao. */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgGovrnAbilityFormDTO; -import com.epmet.dto.screen.result.CommunityGovernAbilityResultDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -71,5 +70,5 @@ public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao> selectCommunityGovernAbility(@Param("customerId")String customerId, @Param("monthId")String monthId); + List> selectCommunityGovernAbility(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index cdecd48f51..c23bf91b4c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.GridPartyMemberDataFormDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java index a2fe8dc821..aeaf65e6b5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java @@ -15,14 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; -import com.epmet.dto.indexcollect.FactIndexPartyAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridPartyAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -88,5 +87,21 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao selectPartyAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + /** + * @return java.lang.Integer + * @param formDTO + * @author yinzuomei + * @description 查询(党建能力-网格相关事实表) 这个月共上传记录数 + * @Date 2020/9/2 14:28 + **/ Integer selectCount(CalculateCommonFormDTO formDTO); + + /** + * @return java.lang.String + * @param formDTO + * @author yinzuomei + * @description 场景:客户这个月只上传了一个网格的事实记录 + * @Date 2020/9/2 14:45 + **/ + String selectTheOneGrid(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index 144ecd1d0a..44d3a19638 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -15,16 +15,17 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgPartyAbilityFormDTO; import com.epmet.dto.screen.result.CommunityPublishArticleCountResultDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 党建能力-街道及社区相关事实表 @@ -72,4 +73,13 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao selectPublishArticleCount(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * @Description 查询社区下的发文数 Map + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/26 10:49 上午 + */ + List> selectPublishArticleCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java similarity index 82% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java index 7357c0cedc..ca2489ba6f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; -import com.epmet.dto.indexcollect.FactIndexServiceAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridServiceAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexServiceAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -85,4 +85,22 @@ public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao selectServiceAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * @return int + * @param formDTO + * @author yinzuomei + * @description 查询(服务能力-网格相关事实表)共上传记录数 + * @Date 2020/9/2 14:28 + **/ + int selectCount(CalculateCommonFormDTO formDTO); + + /** + * @return java.lang.String + * @param formDTO + * @author yinzuomei + * @description 场景:客户这个月只上传了一个网格的事实记录 + * @Date 2020/9/2 14:46 + **/ + String selectTheOneGrid(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java index 261fb8b945..b17ad01eea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java @@ -15,17 +15,17 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgServiceAbilityFormDTO; import com.epmet.dto.screen.result.CommunityActivityCountResultDTO; -import com.epmet.dto.screen.result.CommunityPublishArticleCountResultDTO; -import com.epmet.entity.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 服务能力-组织(街道|社区|全区)相关事实表 @@ -73,4 +73,14 @@ public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao selectActivityCount(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * @Description 社区活动组织次数 + * @param customerId + * @param monthId + * @param level + * @author zxc + * @date 2020/9/2 2:09 下午 + */ + List> selectActivityCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java similarity index 91% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java index 607132ea18..189afc8e84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; -import com.epmet.entity.screen.FactIndexCommunityScoreEntity; +import com.epmet.entity.evaluationindex.screen.FactIndexCommunityScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -35,7 +35,7 @@ import java.util.List; public interface FactIndexCommunityScoreDao extends BaseDao { /** - * @Description 党建能力【社区】中间表插入 + * @Description 【社区】中间表插入 * @param lists * @author zxc * @date 2020/8/27 5:05 下午 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java index 223a297db4..96ba8f3c9f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; -import com.epmet.entity.screen.FactIndexGridScoreEntity; +import com.epmet.entity.evaluationindex.screen.FactIndexGridScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java similarity index 68% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java index 25e10869ed..4289caf4db 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java @@ -1,7 +1,7 @@ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexCodeFieldReEntity; +import com.epmet.entity.evaluationindex.screen.IndexCodeFieldReEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java index 7aa2ab9733..780fabd1d2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexDictEntity; +import com.epmet.entity.evaluationindex.screen.IndexDictEntity; import org.apache.ibatis.annotations.Mapper; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java index 5458720940..26cb71f2ec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupEntity; import org.apache.ibatis.annotations.Mapper; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java index 8982bc5f29..b22d6a4a71 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java index 29f074c13f..eb0c0b260a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java index c1e14b531c..0e1b5a2a06 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java index 12271b8e3c..8cd75faff7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CpcBaseDataFormDTO; -import com.epmet.entity.screen.ScreenCpcBaseDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCpcBaseDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index d7851cd754..f0d189f7ea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -15,12 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CustomerAgencyFormDTO; -import com.epmet.dto.screencoll.form.CustomerGridFormDTO; -import com.epmet.entity.screen.ScreenCustomerAgencyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java index 53f37049a3..00baee166f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CustomerDeptFormDTO; -import com.epmet.entity.screen.ScreenCustomerDeptEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java index b826b7cbcc..4254712cbf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.screencoll.form.CustomerGridFormDTO; -import com.epmet.entity.screen.ScreenCustomerGridEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java index 1a9b991bac..21eaa80280 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.DifficultyDataFormDTO; -import com.epmet.entity.screen.ScreenDifficultyDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java index ec80809c55..14c0153f62 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.EventDataFormDTO; -import com.epmet.entity.screen.ScreenEventDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenEventDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java similarity index 91% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java index 42ca86859e..835b1f112d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.ScreenEventImgDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenEventImgDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java index ea3d67aa68..3dca5cc281 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.GovernRankDataFormDTO; -import com.epmet.entity.screen.ScreenGovernRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenGovernRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index e97406febf..a38ff1cbe6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO; -import com.epmet.entity.screen.ScreenIndexDataMonthlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenIndexDataMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java index 4ca64f6944..bb2a5eeb6e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.IndexDataYearlyFormDTO; -import com.epmet.entity.screen.ScreenIndexDataYearlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenIndexDataYearlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java index 4eabfd508a..00b4599fe4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.OrgRankDataFormDTO; -import com.epmet.entity.screen.ScreenOrgRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenOrgRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java index 3cae4a160d..3f2de14703 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyBranchDataFormDTO; -import com.epmet.entity.screen.ScreenPartyBranchDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyBranchDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java index 276b08e356..931c05c6bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyLinkMassesDataFormDTO; -import com.epmet.entity.screen.ScreenPartyLinkMassesDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyLinkMassesDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java index 9e43669618..e1f527f47d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyUserRankDataFormDTO; -import com.epmet.entity.screen.ScreenPartyUserRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java index 202fc4aa59..b50d74b1a9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PioneerDataFormDTO; -import com.epmet.entity.screen.ScreenPioneerDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java index a4fdc9f221..5bc9ea4130 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PublicPartiTotalDataFormDTO; -import com.epmet.entity.screen.ScreenPublicPartiTotalDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPublicPartiTotalDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java index 69422c07c4..a620008b22 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.ScreenUserJoinEntity; +import com.epmet.entity.evaluationindex.screen.ScreenUserJoinEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java index e0712dee50..5595259af6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.UserTotalDataFormDTO; -import com.epmet.entity.screen.ScreenUserTotalDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java new file mode 100644 index 0000000000..879018ac99 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java @@ -0,0 +1,90 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.evaluationindex.indexcal; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_agency_score") +public class AgencyScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织id(eg:社区或者街道id) + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentAgencyId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan + */ + private String indexCode; + + /** + * 数据类型 district :全区;street:街道 + */ + private String dataType; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java index cca1b90ff2..0b21c5de92 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexscore; +package com.epmet.entity.evaluationindex.indexcal; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java new file mode 100644 index 0000000000..8517c59ff1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java @@ -0,0 +1,85 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.evaluationindex.indexcal; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_dept_score") +public class DeptScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 部门id + */ + private String deptId; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 治理能力:zhilinengli; + */ + private String indexCode; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java index 9b1bdf2f73..781dca54bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexscore; +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; -import java.util.Date; /** * 网格相关分值 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java index 24827756fa..47501f13f4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-部门相关数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java index c1c6553ef5..7b0c61a9fd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-网格相关事实表 @@ -82,7 +80,7 @@ public class FactIndexGovrnAblityGridMonthlyEntity extends BaseEpmetEntity { /** * 网格议题转项目率 */ - private BigDecimal avgShiftProjectRatio; + private BigDecimal issueToProjectRatio; /** * 网格总项目数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java index 94eec97d6f..a104561749 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-街道及社区相关数据 @@ -70,7 +68,7 @@ public class FactIndexGovrnAblityOrgMonthlyEntity extends BaseEpmetEntity { private String yearId; /** - * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + * 数据类型 district:全区;street:街道;community:社区;grid:网格 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java index 689c396b2a..550a5ce8a1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 党建能力-党员相关的事实表 @@ -50,7 +48,7 @@ public class FactIndexPartyAblityCpcMonthlyEntity extends BaseEpmetEntity { private String agencyId; /** - * 上级组织Id + * agency_id的上级组织Id */ private String parentId; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java index 208106e87a..b38d4c4d7a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 党建能力-网格相关事实表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java index 1bf023f055..80bcce0819 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 党建能力-街道及社区相关事实表 * @@ -74,7 +71,7 @@ public class FactIndexPartyAblityOrgMonthlyEntity extends BaseEpmetEntity { private Integer publishArticleCount; /** - * 数据类型 allRegion:全区;community:社区;street:街道 + * 数据类型 district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java index d4c6aa6ab6..fedcaf1637 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 服务能力-网格相关事实表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java index 8abeb1c172..a93c7fbae4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 服务能力-组织(街道|社区|全区)相关事实表 * @@ -74,7 +71,7 @@ public class FactIndexServiceAblityOrgMonthlyEntity extends BaseEpmetEntity { private Integer activityCount; /** - * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + * 数据类型 district:全区;street:街道;community:社区;grid:网格 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java index b43e51ad7c..40a112d6d8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 社区相关-党建能力【五级权重】分数表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java index 01b0ff363f..d99cd7b506 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 社区相关分数表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java index 99bc4d0ed1..05ab819f20 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 网格相关分值 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java index 7821fbe41b..042508eae6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java @@ -1,4 +1,4 @@ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java index 299a1dca5c..e0932daeef 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java index ba9d1a3b09..8a1b94fb3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java index bedab6e7f7..0d06fe6955 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java index dcd8c63648..dfe57f7d8d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java index 6a6408f7a1..e22f7e6f2f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java index e649e5e89f..fa70f90897 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层党建-党员基本情况 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java index 96b2e23dfe..e06907ca84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java @@ -14,16 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 组织机构信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java index f020e44cd8..6fdb38f4b8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 部门信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java index 62dddc6960..19fdd132be 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 网格(党支部)信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java index 9a4d3af36b..35f4ca3ee4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层治理-难点堵点(耗时最长|设计部门最多|处理次数) * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java similarity index 98% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java index 0242ab8ce2..ea8b52cd3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java @@ -15,10 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java index fb0e81290b..8609b4f1b9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 中央区-事件数据图片数据 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java index d280785a6c..f60c612d9e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 基层治理-治理能力排行数据(按月统计) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java index fbeb83ba9a..e8d16e858d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 指数-指数数据(每月数值) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java index 259947010d..3c6b62b0e4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 指数-指数数据(按年统计) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java index abbdbb7d20..1c1a893327 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 党建引领-组织先进排行榜 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java index cb870d2de7..34ecdac955 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java @@ -14,16 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层党建-建设情况数据(支部,联建,志愿服务)按月 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java index c663fc770b..0a8d768127 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 党建引领-党员联系群众数据 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java index c542da7085..4d70bf29ff 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 党建引领|基层治理-市民(党员)积分排行榜 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java index b53561b229..a51b8b6449 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 党建引领-先锋模范数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java index 56905509ad..3f38146cc6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 公众参与-各类(话题|议题|项目|注册人数|参与人数)总数 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java index 8a2009d9ca..75668a1215 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 基层治理-公众参与 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java index bc50eaea04..c41ef72cc3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 中央区-各类(用户|党员|党群|话题|议题|项目)总数 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java index 620175e5c5..88e759af17 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -25,6 +25,9 @@ public enum IndexCodeEnum { LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz","组织内党员的联系群众能力考评分(平均值)",5), ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydsyysnlkpfpjz","组织内党员的参与议事能力考评分(平均值)",5), + XIA_SHU_SUO_YOU_WGDDJNLPJZ("xiashusuoyouwgddjnlpjz","下属所有网格的党建能力(平均值)",5), + SHE_QU_XIA_SHU_SYWGZLNLHZPJZ("shequxiashusywgzlnlhzpjz","社区下属所有网格治理能力汇总(平均值)",5), + SHE_QU_XIA_JI_SYWGFWNLDFPJZ("shequxiajisywgfwnldfpjz","社区下级所有网格服务能力得分(平均值) ",5), ; private String code; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index 9267d562a8..eef2856684 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -5,12 +5,12 @@ import com.alibaba.excel.event.AnalysisEventListener; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.UniqueIdGenerator; -import com.epmet.entity.screen.IndexDictEntity; -import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; -import com.epmet.entity.screen.IndexGroupTemplateEntity; -import com.epmet.service.screen.IndexDictService; -import com.epmet.service.screen.IndexGroupDetailTemplateService; -import com.epmet.service.screen.IndexGroupTemplateService; +import com.epmet.entity.evaluationindex.screen.IndexDictEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity; +import com.epmet.service.evaluationindex.screen.IndexDictService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailTemplateService; +import com.epmet.service.evaluationindex.screen.IndexGroupTemplateService; import com.epmet.util.Pinyin4jUtil; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -130,7 +130,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { String level4Index = index.getLevel4Index(); indexDictEntity = indexDicMap.get(level4Index); - IndexGroupTemplateEntity group2 = indexGroupMap.get(index.getLevel1Index() + level4Index); + String level4IndexDetailKey = index.getLevel1Index() + index.getLevel2Index() + level4Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(level4IndexDetailKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); @@ -138,7 +139,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setParentIndexGroupId(group1.getId()); group2.setId(UniqueIdGenerator.generate()); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); - indexGroupMap.put(index.getLevel1Index() + level4Index, group2); + indexGroupMap.put(level4IndexDetailKey, group2); //构建 分组明细 templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + level4Index); if (templateEntity == null) { @@ -154,9 +155,10 @@ public class IndexExcelDataListener extends AnalysisEventListener { } indexDictEntity = indexDicMap.get(index.getLevel5Index()); + String level5IndexDetailKey = index.getLevel1Index() + index.getLevel2Index() + index.getLevel5Index(); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); + templateEntity = indexGroupDetailMap.get(level5IndexDetailKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -165,7 +167,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); - indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); + indexGroupDetailMap.put(level5IndexDetailKey, templateEntity); } } else { //todo 测试完去掉 @@ -183,8 +185,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); String level2Index = index.getLevel2Index(); indexDictEntity = indexDicMap.get(level2Index); - String groupMapKey = index.getLevel1Index() + level2Index; - IndexGroupTemplateEntity group2 = indexGroupMap.get(groupMapKey); + String level2IndexGroupKey = index.getLevel1Index() + level2Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(level2IndexGroupKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); @@ -193,9 +195,9 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setId(UniqueIdGenerator.generate()); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); - indexGroupMap.put(groupMapKey, group2); + indexGroupMap.put(level2IndexGroupKey, group2); //构建 分组明细 - templateEntity = indexGroupDetailMap.get(level2Index); + templateEntity = indexGroupDetailMap.get(level2IndexGroupKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -204,13 +206,14 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); - indexGroupDetailMap.put(groupMapKey, templateEntity); + indexGroupDetailMap.put(level2IndexGroupKey, templateEntity); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); + String level5IndexGroupKey = index.getLevel1Index() + index.getLevel2Index() + index.getLevel5Index(); + templateEntity = indexGroupDetailMap.get(level5IndexGroupKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -219,7 +222,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); - indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); + indexGroupDetailMap.put(level5IndexGroupKey, templateEntity); } } //} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java index 2863952420..8a99d62890 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java @@ -51,4 +51,12 @@ public class IndexCodeFieldReRedis { hashOperations.putAll(RedisKeys.getIndexCodeFieldReKey(), records); redisTemplate.expire(RedisKeys.getIndexCodeFieldReKey(), 1, TimeUnit.DAYS); } + + /** + * desc:删除指标字段关系缓存 + * @return + */ + public Boolean deleteIndexCodeFromRedis() { + return redisTemplate.delete(RedisKeys.getIndexCodeFieldReKey()); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java new file mode 100644 index 0000000000..0805622937 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; + +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface AgencyScoreService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-09-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-09-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return AgencyScoreDTO + * @author generator + * @date 2020-09-02 + */ + AgencyScoreDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void save(AgencyScoreDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void update(AgencyScoreDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-09-02 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java index d65f6d43db..3cd66eccf5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.indexcal.CalculateCommonFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java new file mode 100644 index 0000000000..afb6bc40bc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java @@ -0,0 +1,39 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface DeptScoreService extends BaseService { + /** + * @return java.lang.Boolean + * @param formDTO + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java index 6648205d5c..14d2ac604c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java @@ -1,6 +1,5 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; -import com.epmet.commons.tools.utils.Result; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java new file mode 100644 index 0000000000..09d344dd47 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java @@ -0,0 +1,17 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:33 上午 + */ +public interface IndexCalculateCommunityService { + + /** + * @Description 计算社区相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/1 4:12 下午 + */ + Boolean calCommunityAll(String customerId, String monthId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java similarity index 73% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java index 70c49c77fe..a1ab0ad1bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.screen.form.IndexCalculateForm; @@ -10,7 +10,7 @@ import com.epmet.dto.screen.form.IndexCalculateForm; */ public interface IndexCalculateService { /** - * desc:计算党员相关指标 + * desc:按照客户计算所有指标(按照月份) * @param formDTO * @return */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java new file mode 100644 index 0000000000..c27b6db508 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java @@ -0,0 +1,18 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/9/2 3:11 下午 + */ +public interface IndexCalculateStreetService { + + /** + * @Description 计算街道相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/2 3:12 下午 + */ + Boolean calStreetAll(String customerId, String monthId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java index e54f182903..d2804d1dec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java new file mode 100644 index 0000000000..17f56e6895 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; +import com.epmet.service.evaluationindex.indexcal.AgencyScoreService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class AgencyScoreServiceImpl extends BaseServiceImpl implements AgencyScoreService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, AgencyScoreDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, AgencyScoreDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public AgencyScoreDTO get(String id) { + AgencyScoreEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, AgencyScoreDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index c2d8a924cb..7876c2158e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,20 +1,23 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.screen.IndexCodeFieldReDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dao.evaluationindex.screen.IndexCodeFieldReDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.entity.indexscore.CpcScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.CpcIndexCalculateService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; +import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; import com.epmet.support.normalizing.BigDecimalScoreCalculator; import com.epmet.support.normalizing.Correlation; import com.epmet.support.normalizing.ScoreCalculator; @@ -35,6 +38,7 @@ import java.util.stream.Collectors; @Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; @@ -83,38 +87,35 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { if (totalEntity == null) { totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); totalEntity.setIsTotal(NumConstant.ONE_STR); - totalEntity.setIndexCode(indexGroupDetailEntity.getIndexCode()); + totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); totalEntity.setScore(new BigDecimal(0)); cpcScoreTotalMap.put(userId, totalEntity); } - //todo 自建群活跃度——议题转项目率 有阈值 >60%按60%算 + //自建群活跃度——议题转项目率 有阈值 >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)); } }); - insertBatch(cpcScoreTotalMap.values().stream().collect(Collectors.toList())); + deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(),cpcScoreTotalMap.values().stream().collect(Collectors.toList())); } - private void insertBatch(Collection values) { + private void deleteAndInsertBatch(String customerId, String monthId, String indexCode, Collection values) { + cpcScoreDao.deleteByMonthId(customerId, monthId, indexCode); cpcScoreDao.insertBatch(values); } private void calculatePartScore(CalculateCommonFormDTO formDTO) { - Map indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); - if (CollectionUtils.isEmpty(indexCodeFieldReList)) { - log.error("cpcIndexCalculate have any indexcodefieldre"); - return; - } //计算最大最小值 Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.error("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); - return; + throw new RenException("指标原始数据记录不存在"); } //指标集合 Map> groupIndexDetailsMap = getIndexDetailMap(formDTO); if (groupIndexDetailsMap == null) { + log.error("calculatePartScore"); return; } @@ -152,7 +153,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { IndexInputVO value = entry.getValue(); String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); if (StringUtils.isBlank(fieldName)) { - log.error("cpcIndexCalculate fieldName error"); + log.error("calculateScore indexCode:{} get fieldName return blank", indexCode); continue; } @@ -179,11 +180,15 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { value.getIndexValueVOs().add(currentUserIndexValue); } } - log.warn("计算的参数:{}", indexMap); + log.info("计算的参数:{}", JSON.toJSONString(indexMap)); HashMap result = calculateScore(indexMap); - log.warn("计算的结果:{}", result); + log.info("计算的结果:{}", result); //处理结果 + if (CollectionUtils.isEmpty(result)){ + log.error("calculateScore calculateScore return empty"); + return; + } saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); } @@ -197,14 +202,14 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { */ @Transactional(rollbackFor = Exception.class) public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); + List list = new ArrayList<>(); result.forEach((userId, score) -> { CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); cpcScoreEntity.setScore(score); list.add(cpcScoreEntity); }); - this.insertBatch(list); + this.deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),parentIndexCode,list); } @@ -226,13 +231,20 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); + if (StringUtils.isBlank(fieldName)) { + continue; + } //最小值key String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); //最大值key String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); - minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); - + minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); + //如果最大值超过阈值 则最大值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(new BigDecimal(NumConstant.ONE_NEG)) == NumConstant.ONE){ + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -240,7 +252,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(),new ArrayList<>(),index.getThreshold(),index.getWeight(),scoreCalculator); + IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO); } return map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java new file mode 100644 index 0000000000..d999757956 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.DeptScoreService; +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.util.List; + + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Slf4j +@Service +public class DeptScoreServiceImpl extends BaseServiceImpl implements DeptScoreService { + @Autowired + private IndexGroupDetailService getDetailListByParentCode; + @Autowired + private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; + + /** + * @param formDTO + * @return java.lang.Boolean + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + @Override + public Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO) { + //获取指标权重 + List parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.QU_ZHI_BU_MEN.getCode(), + IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(parentIndexDetails)) { + log.warn("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【区直部门:治理能力】指标权重信息不存在"); + } + log.info(JSON.toJSONString(parentIndexDetails)); + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java similarity index 75% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 7fa8281f15..306c3c7713 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,29 +1,38 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.indexscore.GridScoreDao; -import com.epmet.dao.screen.ScreenCustomerGridDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.*; -import com.epmet.entity.indexscore.GridScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.GridCorreLationService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; -import com.epmet.support.normalizing.*; -import com.epmet.support.normalizing.batch.*; +import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.IndexOutputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -40,9 +49,10 @@ import java.util.stream.Collectors; * @author yinzuomei@elink-cn.com * @date 2020/8/26 10:35 */ +@Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class GridCorreLationServiceImpl implements GridCorreLationService { - private Logger logger = LogManager.getLogger(GridCorreLationServiceImpl.class); @Autowired private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; @Autowired @@ -76,36 +86,33 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(dangJianNengLiList)) { - logger.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:党建能力】指标权重信息不存在"); } calculateGridDangJian(formDTO, dangJianNengLiList); - //2、计算网格相关-治理能力 List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(zhiLiNengLiList)) { - logger.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); } calculateGridZhiLi(formDTO, zhiLiNengLiList); - //3、计算网格相关-服务能力 List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(fuWuNengLiList)) { - logger.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); } calculateGridFuWu(formDTO, fuWuNengLiList); - //4、计算网格相关总分 List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); if (CollectionUtils.isEmpty(wgxgList)) { - logger.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关】指标权重信息不存在"); } calculateGridTotal(formDTO, wgxgList, IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); @@ -127,16 +134,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-党建能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + } else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -155,21 +166,21 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { - //对应的数值 - String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); - //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { + log.info("index_code :{}",key); + if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { //组织内党员的联系群众能力考评分(平均值) - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); //网格内党员的联系群众能力考评分(平均值) String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO, gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); } }); }); @@ -180,6 +191,31 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), NumConstant.ZERO_STR); } + /** + * @param formDTO + * @param indexCode + * @return void + * @author yinzuomei + * @description 只有一条事实记录时,分值默认赋50 + * @Date 2020/9/2 14:35 + **/ + private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) { + List> resultMapList = new ArrayList<>(); + HashMap resultMap = new HashMap<>(); + String gridId =null; + if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexPartyAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.ZHI_LI_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexGovrnAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.FU_WU_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexServiceAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } + resultMap.put(gridId, new BigDecimal(NumConstant.FIFTY_STR)); + resultMapList.add(resultMap); + // 保存中间表 + saveGridCorreLationResult(formDTO, resultMapList, indexCode, NumConstant.ZERO_STR); + } + /** * @param calculateCommonFormDTO * @return java.util.Map @@ -199,6 +235,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + //FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("24.35")); + map.put(StrConstant.MAX, new BigDecimal("46.13"));*/ return map; } @@ -215,6 +254,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("24.43"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("46.13"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("24.35"); + }*/ return result; } @@ -231,6 +279,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("29.40"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("18.30"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("9.15"); + }*/ return result; } @@ -253,6 +310,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + // FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("9.15")); + map.put(StrConstant.MAX, new BigDecimal("29.4"));*/ return map; } @@ -275,7 +335,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { String yearId = DateUtils.getYearId(formDTO.getMonthId()); for (HashMap resultMap : resultMapList) { resultMap.forEach((gridId, partyAblityScore) -> { - logger.info("网格id:" + gridId + ";分值:" + partyAblityScore); + log.info("网格id:" + gridId + ";index_Code:"+indexCode+";分值:" + partyAblityScore); GridScoreEntity gridScoreEntity = new GridScoreEntity(); gridScoreEntity.setCustomerId(formDTO.getCustomerId()); gridScoreEntity.setGridId(gridId); @@ -283,8 +343,12 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setIndexCode(indexCode); ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(formDTO.getCustomerId(), gridId); if (null != screenCustomerGridDTO) { - gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); - gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + if(StringUtils.isNotBlank(screenCustomerGridDTO.getParentAgencyId())){ + gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); + } + if(StringUtils.isNotBlank(screenCustomerGridDTO.getAllParentIds())){ + gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + } } gridScoreEntity.setQuarterId(quarterId); gridScoreEntity.setYearId(yearId); @@ -309,10 +373,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); - logger.info("计算的参数:{}", indexInputVOS); + log.info("计算的参数"+JSON.toJSONString(indexInputVOS)); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + + //如果想看每一个指标的分值调用下面的方法 + List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + log.info("计算的结果(List)"+JSON.toJSONString(listTemp)); + HashMap resultMap = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - logger.info("计算的结果:{}", resultMap); + log.info("计算的结果{}", resultMap); return resultMap; } @@ -344,23 +413,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private Map> buildGridCorrelationIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); for (IndexGroupDetailEntity index : indexList) { -// IndexInputVO indexInputVO = new IndexInputVO(); - // 指标code -// indexInputVO.setIndexId(index.getIndexCode()); - //阈值 -// indexInputVO.setThreshold(index.getThreshold()); - //权重 -// indexInputVO.setWeight(index.getWeight()); BigDecimal minValue = null; BigDecimal maxValue = null; if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { //组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值 - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); Map contactMassesAblityMap = this.getContactMassesAblityMap(formDTO); minValue = contactMassesAblityMap.get(StrConstant.MIN); maxValue = contactMassesAblityMap.get(StrConstant.MAX); } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(index.getIndexCode())) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); Map joinIssueAblityMap = this.getJoinIssueAblityMap(formDTO); minValue = joinIssueAblityMap.get(StrConstant.MIN); maxValue = joinIssueAblityMap.get(StrConstant.MAX); @@ -368,15 +430,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); if (StringUtils.isBlank(fieldName)) { - logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); + log.error("index_code:{} not find field_name",index.getIndexCode()); continue; } - logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); +// log.info("index_code2:{} ,field_name:{}",index.getIndexCode(),fieldName); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); } + //有阈值,且最大值>阈值,则最大值赋值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG_STR).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(index.getThreshold()) == NumConstant.ONE) { + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -384,12 +451,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); -// indexInputVO.setScoreCalculator(scoreCalculator); List> sampleValueList = new ArrayList<>(); -// indexInputVO.setIndexValueVOs(sampleValueList); IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), sampleValueList, index.getThreshold(), +// new BigDecimal("-1"),//FOR TEST index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO1); @@ -409,16 +475,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -437,19 +507,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); + String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); + BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); + SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); + value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); //构造样本值对象 SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); - String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); - BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); - SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); - value.getIndexValueVOs().add(contactMassesAblityValue); } }); }); @@ -471,18 +540,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private void calculateGridFuWu(CalculateCommonFormDTO formDTO, List indexList) { //查询总记录数 - int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); + int total = factIndexServiceAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -501,7 +574,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); @@ -509,7 +581,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); } else { - logger.error("index_code:" + key + " not find field_name"); + log.error("index_code:" + key + " not find field_name"); } }); }); @@ -532,25 +604,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 List gridScoreDTOList = gridScoreDao.selectList(formDTO); if(CollectionUtils.isEmpty(gridScoreDTOList)){ - logger.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); + log.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); throw new RenException("客户一级指标分值记录不存在"); } Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List gridScoreEntityList = new ArrayList<>(); for (GridScoreDTO gridScoreDTO : gridScoreDTOList) { - GridScoreEntity gridScoreEntity = new GridScoreEntity(); - gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); - gridScoreEntity.setGridId(gridScoreDTO.getGridId()); + GridScoreEntity gridScoreEntity = ConvertUtils.sourceToTarget(gridScoreDTO, GridScoreEntity.class); gridScoreEntity.setIsTotal(NumConstant.ONE_STR); gridScoreEntity.setIndexCode(indexCode); - gridScoreEntity.setAgencyId(gridScoreDTO.getAgencyId()); - gridScoreEntity.setAllParentIds(gridScoreDTO.getAllParentIds()); - gridScoreEntity.setQuarterId(gridScoreDTO.getQuarterId()); - gridScoreEntity.setYearId(gridScoreDTO.getYearId()); - gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); gridScoreEntity.setScore(BigDecimal.ZERO); if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { - logger.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); + log.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); continue; } for (GridScoreDetailDTO gridScoreDetailDTO : gridScoreDTO.getDetailList()) { @@ -565,14 +630,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } } - public static void main(String[] args) { - BigDecimal totalScore = BigDecimal.ZERO; - for (int i = 1; i < 5; i++) { - totalScore = totalScore.add(new BigDecimal("1.00")); - } - System.out.println(totalScore); - } - /** * @param customerId * @return com.epmet.dto.indexcal.CustomerGridInfoDTO diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java new file mode 100644 index 0000000000..229c3059de --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -0,0 +1,428 @@ +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.druid.util.StringUtils; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao; +import com.epmet.dao.evaluationindex.screen.FactIndexGridScoreDao; +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; +import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; +import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; +import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; +import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:34 上午 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommunityService { + + @Autowired + private FactIndexPartyAblityOrgMonthlyDao factIndexPartyAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityOrgMonthlyDao factIndexGovrnAblityOrgMonthlyDao; + @Autowired + private FactIndexServiceAblityOrgMonthlyDao factIndexServiceAblityOrgMonthlyDao; + @Autowired + private IndexGroupDetailService indexGroupDetailService; + @Autowired + private IndexCodeFieldReService indexCodeFieldReService; + @Autowired + private FactIndexCommunityScoreDao factIndexCommunityScoreDao; + @Autowired + private FactIndexGridScoreDao factIndexGridScoreDao; + + /** + * @param customerId + * @Description 社区名义发文数量计算【党建能力】 + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityPartyCalculate(String customerId, String monthId) { + // 党建能力 + // 根据all_parent_index_code 获取指标明细 + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + //下属所有网格的党建能力平均值 + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(customerId, monthId); + if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { + log.error("查询下属所有网格的党建能力平均值集合为空"); + return; + }else if (subGridPartyAvgScore.size() == NumConstant.ONE){ + sizeOne(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (subGridPartyAvgScore.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexEnd = NumConstant.TEN; + List> partition = ListUtils.partition(subGridPartyAvgScore, indexEnd); + partition.forEach(publish -> { + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 社区名义发文数量 + List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(mapList)) { + log.error("查询社区名义发文数量集合为空"); + return; + } + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + }else if (mapList.size() == NumConstant.ONE){ + sizeOne(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (mapList.size() > NumConstant.ONE) { + List decimalList = mapList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> publishArticleList = ListUtils.partition(mapList, 10); + publishArticleList.forEach(publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区治理能力 + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityGovernAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridGovernAvgScore(customerId, monthId); + if (subGridGovernAvg.size() == NumConstant.ONE) { + sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (subGridGovernAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(subGridGovernAvg, 10); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 治理能力的六个五级指标 + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityGovernAbility)){ + log.error("查询治理能力的六个五级指标集合为空"); + return; + }else if (communityGovernAbility.size() == NumConstant.ONE) { + sizeOne(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (communityGovernAbility.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> governAbilityList = ListUtils.partition(communityGovernAbility, 10); + governAbilityList.forEach(governAbility -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + governAbility.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区服务能力 + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityServiceAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + String indexCode = detail.getIndexCode(); + if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); + if (subGridServiceAvg.size() == NumConstant.ONE) { + sizeOne(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId().toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (subGridServiceAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10); + serviceAvgList.forEach(serviceAvg -> { + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + serviceAvg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } else { + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityActivityCountList)) { + log.error("查询社区活动组织次数集合为空"); + return; + }else if (communityActivityCountList.size() == NumConstant.ONE) { + sizeOne(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (communityActivityCountList.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> communityActivityList = ListUtils.partition(communityActivityCountList, 10); + communityActivityList.forEach(communityActivity -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + communityActivity.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.FU_WU_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区相关计算 + * @author zxc + * @date 2020/9/1 9:21 上午 + */ + public Boolean communityRelate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List
+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *
+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *
+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.indexcal; + +import java.io.Serializable; +import java.util.Date; + +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.constant.IndexCalConstant; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +public class AgencyScoreDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织id(eg:社区或者街道id) + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentAgencyId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan + */ + private String indexCode; + + /** + * 数据类型 district :全区;street:街道 + */ + private String dataType; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + public AgencyScoreDTO() { + this.isTotal = NumConstant.ZERO_STR; + this.score = new BigDecimal(NumConstant.ZERO); + this.indexCode = ""; + this.dataType = IndexCalConstant.STREET_LEVEL; + this.delFlag = 0; + this.revision = 0; + this.createdBy = "APP_USER"; + this.updatedBy = "APP_USER"; + } +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java index 4c43a57890..187f69c960 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java @@ -23,6 +23,10 @@ public class CalculateCommonFormDTO implements Serializable { */ private String customerId; + public CalculateCommonFormDTO() { + super(); + } + public CalculateCommonFormDTO(String customerId, String monthId) { this.monthId=monthId; this.customerId=customerId; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java new file mode 100644 index 0000000000..5051aa3d82 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java @@ -0,0 +1,117 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *
+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.indexcal; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +public class DeptScoreDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID 主键 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 部门id + */ + private String deptId; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 治理能力:zhilinengli; + */ + private String indexCode; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityPartyAvgResultDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityPartyAvgResultDTO.java new file mode 100644 index 0000000000..997b9fed0b --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityPartyAvgResultDTO.java @@ -0,0 +1,51 @@ +package com.epmet.dto.indexcal; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @Author zxc + * @DateTime 2020/9/2 4:28 下午 + */ +@Data +public class SubCommunityPartyAvgResultDTO implements Serializable { + + private static final long serialVersionUID = -6439835738195045820L; + + /** + * 机关ID + */ + private String agencyId; + + /** + * 客户ID + */ + private String customerId; + + /** + * 上级组织ID + */ + private String parentId; + + /** + * 月度ID + */ + private String monthId; + + /** + * 季度ID + */ + private String quarterId; + + /** + * 年度ID + */ + private String yearId; + + /** + * 分数 + */ + private BigDecimal score; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java index 50cc040c44..b35ca1537a 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/DeptGovrnAbilityFormDTO.java @@ -40,11 +40,6 @@ public class DeptGovrnAbilityFormDTO implements Serializable { */ private String yearId; - /** - * allRegion:全区;community:社区;street:街道 - */ - private String dataType; - /** * 区直部门被吹哨次数 */ diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java index ef4efd6a24..021533fe59 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/GridGovrnAbilityFormDTO.java @@ -73,7 +73,7 @@ public class GridGovrnAbilityFormDTO implements Serializable { /** * 网格议题转项目率 */ - private BigDecimal avgShiftProjectRatio; + private BigDecimal issueToProjectRatio; /** * 网格自治项目数 统计期网格自身内办结的项目数目 diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java index 7ddb9e785a..1534955c75 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgGovrnAbilityFormDTO.java @@ -41,7 +41,7 @@ public class OrgGovrnAbilityFormDTO implements Serializable { private String yearId; /** - * allRegion:全区;community:社区;street:街道 + * district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java index e5ad40ef3f..cc1401d424 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgPartyAbilityFormDTO.java @@ -41,7 +41,7 @@ public class OrgPartyAbilityFormDTO implements Serializable { private String yearId; /** - * allRegion:全区;community:社区;street:街道 + * district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java index 6ef48c6fa4..59050bced2 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcollect/form/OrgServiceAbilityFormDTO.java @@ -41,7 +41,7 @@ public class OrgServiceAbilityFormDTO implements Serializable { private String yearId; /** - * allRegion:全区;community:社区;street:街道 + * district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/pom.xml b/epmet-module/data-statistical/data-statistical-server/pom.xml index 2b42004dfa..b44b6f2e17 100644 --- a/epmet-module/data-statistical/data-statistical-server/pom.xml +++ b/epmet-module/data-statistical/data-statistical-server/pom.xml @@ -189,6 +189,12 @@ epmet_data_stats_display_user EpmEt-db-UsEr + + + + epmet_evaluation_index_user + EpmEt-db-UsEr + 0 192.168.1.130 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 2b88f53f42..e92d93a3b6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -1,14 +1,24 @@ package com.epmet.controller; -import com.baomidou.mybatisplus.extension.api.R; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.AgencySubTreeDto; import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import com.epmet.entity.stats.DimAgencyEntity; import com.epmet.service.StatsDemoService; -import com.epmet.service.indexcal.GridCorreLationService; -import com.epmet.service.screen.IndexCalculateCommunityService; +import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; import com.epmet.service.stats.DimAgencyService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -17,6 +27,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.List; import java.util.concurrent.ExecutionException; @@ -27,7 +38,6 @@ import java.util.concurrent.Future; @RestController @Slf4j public class DemoController { - @Autowired private StatsDemoService demoService; @@ -117,36 +127,319 @@ public class DemoController { return new Result().ok(list); } - @PostMapping("zxc") - public Result getZxc(){ -// indexCalculateCommunityService.communityPublishArticleCountCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); - indexCalculateCommunityService.communityGovernAbilityCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); + @PostMapping("zxc2") + public Result getZxc2(){ + indexCalculateCommunityService.calCommunityAll("b09527201c4409e19d1dbc5e3c3429a1","202008"); return new Result(); } - @PostMapping("zxc1") - public Result getZxc1(){ - indexCalculateCommunityService.communityPartyCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); + @PostMapping("testcalculategridcorrelation") + public Result testcalculateGridCorreLation(){ + CalculateCommonFormDTO formDTO=new CalculateCommonFormDTO("b09527201c4409e19d1dbc5e3c3429a1","202008"); + gridCorreLationService.calculateGridCorreLation(formDTO); return new Result(); } - @PostMapping("zxc2") - public Result getZxc2(){ - indexCalculateCommunityService.communityServiceAbilityCalculate("b09527201c4409e19d1dbc5e3c3429a1","202008"); + @Autowired + private GridScoreDao gridScoreDao; + @Autowired + private FactIndexPartyAblityGridMonthlyDao factIndexPartyAblityGridMonthlyDao; + @Autowired + private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; + @Autowired + private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao; + @Autowired + private ScreenCustomerGridDao screenCustomerGridDao; +// private static Integer testcal=100; + + @PostMapping("testcal") + public Result testCal(){ + CalculateCommonFormDTO formDTO=new CalculateCommonFormDTO("b09527201c4409e19d1dbc5e3c3429a1","202008"); +// //查询总记录数 +// List gridScoreDTOList=gridScoreDao.selectList(formDTO); +// return new Result>().ok(gridScoreDTOList); + gridCorreLationService.calculateGridCorreLation(formDTO); return new Result(); } - @PostMapping("zxcAll") - public Result getZxcAll(){ - indexCalculateCommunityService.communityRelate("b09527201c4409e19d1dbc5e3c3429a1","202008"); + @PostMapping("insertgridinfo") + public Result insertScreenCustomerGrid(){ + ScreenCustomerGridEntity entity1=new ScreenCustomerGridEntity(); + entity1.setCustomerId(IndexCalConstant.customerId); + entity1.setGridId(IndexCalConstant.S1_C1_G1); + entity1.setGridName("网格S1-C1-G1"); + entity1.setParentAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity1.setAllParentIds("S1,C1"); + entity1.setCreatedBy(IndexCalConstant.insertUser); + entity1.setUpdatedBy(IndexCalConstant.insertUser); + entity1.setDataEndTime("20200901"); + screenCustomerGridDao.insert(entity1); + + ScreenCustomerGridEntity entity2=new ScreenCustomerGridEntity(); + entity2.setCustomerId(IndexCalConstant.customerId); + entity2.setGridId(IndexCalConstant.S1_C1_G2); + entity2.setGridName("网格S1-C1-G2"); + entity2.setParentAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity2.setAllParentIds("S1,C1"); + entity2.setCreatedBy(IndexCalConstant.insertUser); + entity2.setUpdatedBy(IndexCalConstant.insertUser); + entity2.setDataEndTime("20200901"); + screenCustomerGridDao.insert(entity2); + + ScreenCustomerGridEntity entity3=new ScreenCustomerGridEntity(); + entity3.setCustomerId(IndexCalConstant.customerId); + entity3.setGridId(IndexCalConstant.S1_C2_G1); + entity3.setGridName("网格S1-C2-G1"); + entity3.setParentAgencyId(IndexCalConstant.SHE_QU_S1_C2); + entity3.setAllParentIds("S1,C2"); + entity3.setCreatedBy(IndexCalConstant.insertUser); + entity3.setUpdatedBy(IndexCalConstant.insertUser); + entity3.setDataEndTime("20200901"); + screenCustomerGridDao.insert(entity3); + return new Result(); } + @PostMapping("inserttestdata") + public Result test(){ + //网格相关-党建能力 + FactIndexPartyAblityGridMonthlyEntity entity1=this.getPartyAblityGridMonthlyEntity1(); + factIndexPartyAblityGridMonthlyDao.insert(entity1); + FactIndexPartyAblityGridMonthlyEntity entity2=this.getPartyAblityGridMonthlyEntity2(); + factIndexPartyAblityGridMonthlyDao.insert(entity2); + FactIndexPartyAblityGridMonthlyEntity entity3=this.getPartyAblityGridMonthlyEntity3(); + factIndexPartyAblityGridMonthlyDao.insert(entity3); + + //网格相关-治理能力 + FactIndexGovrnAblityGridMonthlyEntity zhiliEntity1=this.getGovrnAblityGridMonthlyEntity1(); + factIndexGovrnAblityGridMonthlyDao.insert(zhiliEntity1); + FactIndexGovrnAblityGridMonthlyEntity zhiliEntity2=this.getGovrnAblityGridMonthlyEntity2(); + factIndexGovrnAblityGridMonthlyDao.insert(zhiliEntity2); + FactIndexGovrnAblityGridMonthlyEntity zhiliEntity3=this.getGovrnAblityGridMonthlyEntity3(); + factIndexGovrnAblityGridMonthlyDao.insert(zhiliEntity3); + + //网格相关-服务能力 + FactIndexServiceAblityGridMonthlyEntity fuwuEntity1=this.getServiceAblityGridMonthlyEntity1(); + factIndexServiceAblityGridMonthlyDao.insert(fuwuEntity1); + FactIndexServiceAblityGridMonthlyEntity fuwuEntity2=this.getServiceAblityGridMonthlyEntity2(); + factIndexServiceAblityGridMonthlyDao.insert(fuwuEntity2); + FactIndexServiceAblityGridMonthlyEntity fuwuEntity3=this.getServiceAblityGridMonthlyEntity3(); + factIndexServiceAblityGridMonthlyDao.insert(fuwuEntity3); - @PostMapping("testcalculategridcorrelation") - public Result testcalculateGridCorreLation(){ - CalculateCommonFormDTO formDTO=new CalculateCommonFormDTO("b09527201c4409e19d1dbc5e3c3429a1","202008"); - gridCorreLationService.calculateGridCorreLation(formDTO); return new Result(); } + //网格相关-党建能力-网格1 + private FactIndexPartyAblityGridMonthlyEntity getPartyAblityGridMonthlyEntity1() { + FactIndexPartyAblityGridMonthlyEntity entity1=new FactIndexPartyAblityGridMonthlyEntity(); + entity1.setCustomerId(IndexCalConstant.customerId); + entity1.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity1.setGridId(IndexCalConstant.S1_C1_G1); + entity1.setMonthId(IndexCalConstant.monthId); + entity1.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity1.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity1.setUserCount(10); // 网格群众用户数 + entity1.setPartyCount(50); // 网格党员用户数 + entity1.setActiveUserCount(100); // 网格活跃群众用户数 + entity1.setActivePartyCount(80); //网格活跃党员用户数 + entity1.setPartyAvgTopicCount(30); //网格党员人均提出话题数 + entity1.setUserAvgTopicCount(10); //网格群众人均提出话题数 + entity1.setPartyAvgShiftProjectCount(50); //网格党员人均提出的议题转项目数 + entity1.setUserAvgShiftProjectCount(50); //网格群众人均提出的议题转项目数 + entity1.setCreateGroupPartyCount(35); //建群党员数(累计值) 去重 + entity1.setPublishArticleCount(35); //网格发文数 + entity1.setIssueToProjectRatio(new BigDecimal("50")); //网格议题转项目率 + entity1.setCreateThreeMeetsCount(10); //组织三会一课次数 + entity1.setJoinThreeMeetsCount(30); //党员参加三会一课人次 + + entity1.setCreatedBy(IndexCalConstant.insertUser); + entity1.setUpdatedBy(IndexCalConstant.insertUser); + return entity1; + } + + //网格相关-党建能力-网格2 + private FactIndexPartyAblityGridMonthlyEntity getPartyAblityGridMonthlyEntity2() { + FactIndexPartyAblityGridMonthlyEntity entity2=new FactIndexPartyAblityGridMonthlyEntity(); + entity2.setCustomerId(IndexCalConstant.customerId); + entity2.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity2.setGridId(IndexCalConstant.S1_C1_G2); + entity2.setMonthId(IndexCalConstant.monthId); + entity2.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity2.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity2.setUserCount(20); // 网格群众用户数 + entity2.setPartyCount(30); // 网格党员用户数 + entity2.setActiveUserCount(20); // 网格活跃群众用户数 + entity2.setActivePartyCount(20); //网格活跃党员用户数 + entity2.setPartyAvgTopicCount(10); //网格党员人均提出话题数 + entity2.setUserAvgTopicCount(50); //网格群众人均提出话题数 + entity2.setPartyAvgShiftProjectCount(35); //网格党员人均提出的议题转项目数 + entity2.setUserAvgShiftProjectCount(55); //网格群众人均提出的议题转项目数 + entity2.setCreateGroupPartyCount(30); //建群党员数(累计值) 去重 + entity2.setPublishArticleCount(30); //网格发文数 + entity2.setIssueToProjectRatio(new BigDecimal("30")); //网格议题转项目率 + entity2.setCreateThreeMeetsCount(25); //组织三会一课次数 + entity2.setJoinThreeMeetsCount(20); //党员参加三会一课人次 + + entity2.setCreatedBy(IndexCalConstant.insertUser); + entity2.setUpdatedBy(IndexCalConstant.insertUser); + return entity2; + } + //网格相关-党建能力-网格3 + private FactIndexPartyAblityGridMonthlyEntity getPartyAblityGridMonthlyEntity3() { + FactIndexPartyAblityGridMonthlyEntity entity3=new FactIndexPartyAblityGridMonthlyEntity(); + entity3.setCustomerId(IndexCalConstant.customerId); + entity3.setAgencyId(IndexCalConstant.SHE_QU_S1_C2); + entity3.setGridId(IndexCalConstant.S1_C2_G1); + entity3.setMonthId(IndexCalConstant.monthId); + entity3.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity3.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity3.setUserCount(60); // 网格群众用户数 + entity3.setPartyCount(80); // 网格党员用户数 + entity3.setActiveUserCount(70); // 网格活跃群众用户数 + entity3.setActivePartyCount(70); //网格活跃党员用户数 + entity3.setPartyAvgTopicCount(40); //网格党员人均提出话题数 + entity3.setUserAvgTopicCount(20); //网格群众人均提出话题数 + entity3.setPartyAvgShiftProjectCount(30); //网格党员人均提出的议题转项目数 + entity3.setUserAvgShiftProjectCount(30); //网格群众人均提出的议题转项目数 + entity3.setCreateGroupPartyCount(20); //建群党员数(累计值) 去重 + entity3.setPublishArticleCount(80); //网格发文数 + entity3.setIssueToProjectRatio(new BigDecimal("80")); //网格议题转项目率 + entity3.setCreateThreeMeetsCount(100); //组织三会一课次数 + entity3.setJoinThreeMeetsCount(100); //党员参加三会一课人次 + + entity3.setCreatedBy(IndexCalConstant.insertUser); + entity3.setUpdatedBy(IndexCalConstant.insertUser); + return entity3; + } + //网格相关-治理能力-网格1 + private FactIndexGovrnAblityGridMonthlyEntity getGovrnAblityGridMonthlyEntity1() { + FactIndexGovrnAblityGridMonthlyEntity entity=new FactIndexGovrnAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity.setGridId(IndexCalConstant.S1_C1_G1); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setIssueTotal(100); //网格总议题数 + entity.setAvgIssueCount(100); //网格人均议题数目 + entity.setIssueToProjectRatio(new BigDecimal("20")); //网格议题转项目率 + entity.setProjectTotal(20);// 网格总项目数 + entity.setSelfSolveProjectCount(10); // 网格自治项目数 统计期网格自身内办结的项目数目 + entity.setResolveProjectCount(100);//网格办结项目数 统计期内办结的项目数目 + entity.setTransferRightRatio(new BigDecimal("100"));//网格吹哨部门准确率 + entity.setSatisfactionRatio(new BigDecimal("100"));//网格内解决的项目的满意度 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + return entity; + } + + //网格相关-治理能力-网格2 + private FactIndexGovrnAblityGridMonthlyEntity getGovrnAblityGridMonthlyEntity2() { + FactIndexGovrnAblityGridMonthlyEntity entity=new FactIndexGovrnAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity.setGridId(IndexCalConstant.S1_C1_G2); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setIssueTotal(70); //网格总议题数 + entity.setAvgIssueCount(10); //网格人均议题数目 + entity.setIssueToProjectRatio(new BigDecimal("20")); //网格议题转项目率 + entity.setProjectTotal(40);// 网格总项目数 + entity.setSelfSolveProjectCount(15); // 网格自治项目数 统计期网格自身内办结的项目数目 + entity.setResolveProjectCount(20);//网格办结项目数 统计期内办结的项目数目 + entity.setTransferRightRatio(new BigDecimal("10"));//网格吹哨部门准确率 + entity.setSatisfactionRatio(new BigDecimal("70"));//网格内解决的项目的满意度 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + + return entity; + } + //网格相关-治理能力-网格3 + private FactIndexGovrnAblityGridMonthlyEntity getGovrnAblityGridMonthlyEntity3() { + FactIndexGovrnAblityGridMonthlyEntity entity=new FactIndexGovrnAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C2); + entity.setGridId(IndexCalConstant.S1_C2_G1); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setIssueTotal(80); //网格总议题数 + entity.setAvgIssueCount(70); //网格人均议题数目 + entity.setIssueToProjectRatio(new BigDecimal("100")); //网格议题转项目率 + entity.setProjectTotal(100);// 网格总项目数 + entity.setSelfSolveProjectCount(20); // 网格自治项目数 统计期网格自身内办结的项目数目 + entity.setResolveProjectCount(20);//网格办结项目数 统计期内办结的项目数目 + entity.setTransferRightRatio(new BigDecimal("70"));//网格吹哨部门准确率 + entity.setSatisfactionRatio(new BigDecimal("10"));//网格内解决的项目的满意度 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + + return entity; + } + + //网格相关-服务能力-网格1 + private FactIndexServiceAblityGridMonthlyEntity getServiceAblityGridMonthlyEntity1() { + FactIndexServiceAblityGridMonthlyEntity entity=new FactIndexServiceAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity.setGridId(IndexCalConstant.S1_C1_G1); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setActivityCount(80);//网格活动组织次数 爱心活动 + entity.setVolunteerRatio(new BigDecimal("70"));//网格志愿者占比 + entity.setPartyVolunteerRatio(new BigDecimal("60"));// 网格党员志愿者率 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + return entity; + } + + //网格相关-服务能力-网格2 + private FactIndexServiceAblityGridMonthlyEntity getServiceAblityGridMonthlyEntity2() { + FactIndexServiceAblityGridMonthlyEntity entity=new FactIndexServiceAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C1); + entity.setGridId(IndexCalConstant.S1_C1_G2); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setActivityCount(40);//网格活动组织次数 爱心活动 + entity.setVolunteerRatio(new BigDecimal("30"));//网格志愿者占比 + entity.setPartyVolunteerRatio(new BigDecimal("80"));// 网格党员志愿者率 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + return entity; + } + + //网格相关-服务能力-网格3 + private FactIndexServiceAblityGridMonthlyEntity getServiceAblityGridMonthlyEntity3() { + FactIndexServiceAblityGridMonthlyEntity entity=new FactIndexServiceAblityGridMonthlyEntity(); + entity.setCustomerId(IndexCalConstant.customerId); + entity.setAgencyId(IndexCalConstant.SHE_QU_S1_C2); + entity.setGridId(IndexCalConstant.S1_C2_G1); + entity.setMonthId(IndexCalConstant.monthId); + entity.setQuarterId(DateUtils.getQuarterId(IndexCalConstant.monthId)); + entity.setYearId(DateUtils.getYearId(IndexCalConstant.monthId)); + + entity.setActivityCount(20);//网格活动组织次数 爱心活动 + entity.setVolunteerRatio(new BigDecimal("80"));//网格志愿者占比 + entity.setPartyVolunteerRatio(new BigDecimal("20"));// 网格党员志愿者率 + + entity.setCreatedBy(IndexCalConstant.insertUser); + entity.setUpdatedBy(IndexCalConstant.insertUser); + return entity; + } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java index 7c12fec411..eaa7c921b1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactIndexCollectController.java @@ -4,7 +4,7 @@ import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.indexcollect.form.*; -import com.epmet.service.indexcollect.FactIndexCollectService; +import com.epmet.service.evaluationindex.indexcoll.FactIndexCollectService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java index 9dab47c148..978181b3a4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexCalculateController.java @@ -1,17 +1,21 @@ package com.epmet.controller; -import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; +import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.screen.form.IndexCalculateForm; -import com.epmet.service.indexcal.CpcIndexCalculateService; -import com.epmet.service.screen.IndexCalculateService; +import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateService; +import com.epmet.util.DimIdGenerator; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.Date; + /** * 指标计算controller * @@ -23,33 +27,43 @@ import org.springframework.web.bind.annotation.RestController; public class IndexCalculateController { @Autowired - private IndexCalculateService indexCalculateService; - + private IndexCalculateService indexCalculateService; + @Autowired private CpcIndexCalculateService cpcIndexCalculateService; /** - * 1、按照客户计算指标(按照月份) + * 按照客户计算所有指标(按照月份) * - * @param externalAppRequestParam * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author zhangyong * @Date 10:52 2020-08-20 **/ - @PostMapping("cpc") - public Result cpcIndexCalculate(ExternalAppRequestParam externalAppRequestParam, @RequestBody IndexCalculateForm formDTO) { - indexCalculateService.indexCalculate(formDTO); - return new Result(); + @PostMapping("all") + public Result indexCalculate(@RequestBody IndexCalculateForm formDTO) { + Boolean aBoolean = indexCalculateService.indexCalculate(formDTO); + if (aBoolean){ + return new Result().ok(true); + } + return new Result().error("指标计算失败"); } - @PostMapping("getMax") - public Result getMax(){ - CalculateCommonFormDTO calculateCommonFormDTO = new CalculateCommonFormDTO("b09527201c4409e19d1dbc5e3c3429a1","202008"); - cpcIndexCalculateService.cpcIndexCalculate(calculateCommonFormDTO); - return new Result(); + + /** + * desc:计算党员指标分数 + * + * @return + */ + @PostMapping("cpc") + public Result cpc(@RequestBody CalculateCommonFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getMonthId())) { + //默认 当前月份-1 + formDTO.setMonthId(DimIdGenerator.getMonthDimId(DateUtils.addDateMonths(new Date(), -1))); + } + return new Result().ok(cpcIndexCalculateService.cpcIndexCalculate(formDTO)); } - /* *//** + /* *//** * 2、党建能力-网格相关指标上报(按照月份) * * @param externalAppRequestParam diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java index c26189717e..03deff604d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/IndexDictController.java @@ -8,10 +8,10 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.screen.form.InitCustomerIndexForm; import com.epmet.model.IndexExcelDataListener; import com.epmet.model.IndexModel; -import com.epmet.service.screen.IndexDictService; -import com.epmet.service.screen.IndexGroupDetailTemplateService; -import com.epmet.service.screen.IndexGroupService; -import com.epmet.service.screen.IndexGroupTemplateService; +import com.epmet.service.evaluationindex.screen.IndexDictService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailTemplateService; +import com.epmet.service.evaluationindex.screen.IndexGroupService; +import com.epmet.service.evaluationindex.screen.IndexGroupTemplateService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java index 60042f986b..99ba483433 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ScreenCollController.java @@ -4,7 +4,7 @@ import com.epmet.commons.extappauth.annotation.ExternalAppRequestAuth; import com.epmet.commons.extappauth.bean.ExternalAppRequestParam; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.screencoll.form.*; -import com.epmet.service.screen.ScreenCollService; +import com.epmet.service.evaluationindex.screen.ScreenCollService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java new file mode 100644 index 0000000000..71f4f09bca --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/AgencyScoreDao.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Mapper +public interface AgencyScoreDao extends BaseDao { + + /** + * @Description 【街道】中间表插入 + * @param lists + * @author zxc + * @date 2020/8/27 5:05 下午 + */ + void insertStreetRecord(@Param("lists") List lists); + + /** + * @Description 删除旧记录 + * @param customerId + * @param monthId + * @param indexCode + * @author zxc + * @date 2020/9/2 15:47 + */ + void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("dataType")String dataType); + + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java index 2142128e3b..9c3d339ae8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexscore; +package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.entity.indexscore.CpcScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java new file mode 100644 index 0000000000..4f670bbfe2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Mapper +public interface DeptScoreDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java index 71316cf4f4..2e4a10cde2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java @@ -15,12 +15,12 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexscore; +package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.GridScoreDTO; -import com.epmet.entity.indexscore.GridScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java index f56638a3f6..5db8adb014 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java @@ -1,4 +1,4 @@ -package com.epmet.dao.indexcoll; /** +package com.epmet.dao.evaluationindex.indexcoll; /** * Copyright 2018 人人开源 https://www.renren.io * * This program is free software: you can redistribute it and/or modify @@ -18,7 +18,7 @@ package com.epmet.dao.indexcoll; /** import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.DeptGovrnAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java index b3002609d1..55d0e5730b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcollect.form.GridGovrnAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -91,8 +91,17 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao. */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgGovrnAbilityFormDTO; -import com.epmet.dto.screen.result.CommunityGovernAbilityResultDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -71,5 +70,5 @@ public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao> selectCommunityGovernAbility(@Param("customerId")String customerId, @Param("monthId")String monthId); + List> selectCommunityGovernAbility(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index cdecd48f51..c23bf91b4c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.GridPartyMemberDataFormDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java index a2fe8dc821..aeaf65e6b5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java @@ -15,14 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; -import com.epmet.dto.indexcollect.FactIndexPartyAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridPartyAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -88,5 +87,21 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao selectPartyAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + /** + * @return java.lang.Integer + * @param formDTO + * @author yinzuomei + * @description 查询(党建能力-网格相关事实表) 这个月共上传记录数 + * @Date 2020/9/2 14:28 + **/ Integer selectCount(CalculateCommonFormDTO formDTO); + + /** + * @return java.lang.String + * @param formDTO + * @author yinzuomei + * @description 场景:客户这个月只上传了一个网格的事实记录 + * @Date 2020/9/2 14:45 + **/ + String selectTheOneGrid(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index 144ecd1d0a..44d3a19638 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -15,16 +15,17 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgPartyAbilityFormDTO; import com.epmet.dto.screen.result.CommunityPublishArticleCountResultDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 党建能力-街道及社区相关事实表 @@ -72,4 +73,13 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao selectPublishArticleCount(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * @Description 查询社区下的发文数 Map + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/26 10:49 上午 + */ + List> selectPublishArticleCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java similarity index 82% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java index 7357c0cedc..ca2489ba6f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; -import com.epmet.dto.indexcollect.FactIndexServiceAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridServiceAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexServiceAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -85,4 +85,22 @@ public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao selectServiceAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * @return int + * @param formDTO + * @author yinzuomei + * @description 查询(服务能力-网格相关事实表)共上传记录数 + * @Date 2020/9/2 14:28 + **/ + int selectCount(CalculateCommonFormDTO formDTO); + + /** + * @return java.lang.String + * @param formDTO + * @author yinzuomei + * @description 场景:客户这个月只上传了一个网格的事实记录 + * @Date 2020/9/2 14:46 + **/ + String selectTheOneGrid(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java index 261fb8b945..b17ad01eea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java @@ -15,17 +15,17 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgServiceAbilityFormDTO; import com.epmet.dto.screen.result.CommunityActivityCountResultDTO; -import com.epmet.dto.screen.result.CommunityPublishArticleCountResultDTO; -import com.epmet.entity.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 服务能力-组织(街道|社区|全区)相关事实表 @@ -73,4 +73,14 @@ public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao selectActivityCount(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * @Description 社区活动组织次数 + * @param customerId + * @param monthId + * @param level + * @author zxc + * @date 2020/9/2 2:09 下午 + */ + List> selectActivityCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java similarity index 91% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java index 607132ea18..189afc8e84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; -import com.epmet.entity.screen.FactIndexCommunityScoreEntity; +import com.epmet.entity.evaluationindex.screen.FactIndexCommunityScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -35,7 +35,7 @@ import java.util.List; public interface FactIndexCommunityScoreDao extends BaseDao { /** - * @Description 党建能力【社区】中间表插入 + * @Description 【社区】中间表插入 * @param lists * @author zxc * @date 2020/8/27 5:05 下午 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java index 223a297db4..96ba8f3c9f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; -import com.epmet.entity.screen.FactIndexGridScoreEntity; +import com.epmet.entity.evaluationindex.screen.FactIndexGridScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java similarity index 68% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java index 25e10869ed..4289caf4db 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java @@ -1,7 +1,7 @@ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexCodeFieldReEntity; +import com.epmet.entity.evaluationindex.screen.IndexCodeFieldReEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java index 7aa2ab9733..780fabd1d2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexDictEntity; +import com.epmet.entity.evaluationindex.screen.IndexDictEntity; import org.apache.ibatis.annotations.Mapper; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java index 5458720940..26cb71f2ec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupEntity; import org.apache.ibatis.annotations.Mapper; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java index 8982bc5f29..b22d6a4a71 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java index 29f074c13f..eb0c0b260a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java index c1e14b531c..0e1b5a2a06 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java index 12271b8e3c..8cd75faff7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CpcBaseDataFormDTO; -import com.epmet.entity.screen.ScreenCpcBaseDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCpcBaseDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index d7851cd754..f0d189f7ea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -15,12 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CustomerAgencyFormDTO; -import com.epmet.dto.screencoll.form.CustomerGridFormDTO; -import com.epmet.entity.screen.ScreenCustomerAgencyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java index 53f37049a3..00baee166f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CustomerDeptFormDTO; -import com.epmet.entity.screen.ScreenCustomerDeptEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java index b826b7cbcc..4254712cbf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.screencoll.form.CustomerGridFormDTO; -import com.epmet.entity.screen.ScreenCustomerGridEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java index 1a9b991bac..21eaa80280 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.DifficultyDataFormDTO; -import com.epmet.entity.screen.ScreenDifficultyDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java index ec80809c55..14c0153f62 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.EventDataFormDTO; -import com.epmet.entity.screen.ScreenEventDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenEventDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java similarity index 91% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java index 42ca86859e..835b1f112d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.ScreenEventImgDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenEventImgDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java index ea3d67aa68..3dca5cc281 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.GovernRankDataFormDTO; -import com.epmet.entity.screen.ScreenGovernRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenGovernRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index e97406febf..a38ff1cbe6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO; -import com.epmet.entity.screen.ScreenIndexDataMonthlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenIndexDataMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java index 4ca64f6944..bb2a5eeb6e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.IndexDataYearlyFormDTO; -import com.epmet.entity.screen.ScreenIndexDataYearlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenIndexDataYearlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java index 4eabfd508a..00b4599fe4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.OrgRankDataFormDTO; -import com.epmet.entity.screen.ScreenOrgRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenOrgRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java index 3cae4a160d..3f2de14703 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyBranchDataFormDTO; -import com.epmet.entity.screen.ScreenPartyBranchDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyBranchDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java index 276b08e356..931c05c6bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyLinkMassesDataFormDTO; -import com.epmet.entity.screen.ScreenPartyLinkMassesDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyLinkMassesDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java index 9e43669618..e1f527f47d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyUserRankDataFormDTO; -import com.epmet.entity.screen.ScreenPartyUserRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java index 202fc4aa59..b50d74b1a9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PioneerDataFormDTO; -import com.epmet.entity.screen.ScreenPioneerDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java index a4fdc9f221..5bc9ea4130 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PublicPartiTotalDataFormDTO; -import com.epmet.entity.screen.ScreenPublicPartiTotalDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPublicPartiTotalDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java index 69422c07c4..a620008b22 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.ScreenUserJoinEntity; +import com.epmet.entity.evaluationindex.screen.ScreenUserJoinEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java index e0712dee50..5595259af6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.UserTotalDataFormDTO; -import com.epmet.entity.screen.ScreenUserTotalDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java new file mode 100644 index 0000000000..879018ac99 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java @@ -0,0 +1,90 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.evaluationindex.indexcal; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_agency_score") +public class AgencyScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织id(eg:社区或者街道id) + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentAgencyId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan + */ + private String indexCode; + + /** + * 数据类型 district :全区;street:街道 + */ + private String dataType; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java index cca1b90ff2..0b21c5de92 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexscore; +package com.epmet.entity.evaluationindex.indexcal; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java new file mode 100644 index 0000000000..8517c59ff1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java @@ -0,0 +1,85 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.evaluationindex.indexcal; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_dept_score") +public class DeptScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 部门id + */ + private String deptId; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 治理能力:zhilinengli; + */ + private String indexCode; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java index 9b1bdf2f73..781dca54bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexscore; +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; -import java.util.Date; /** * 网格相关分值 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java index 24827756fa..47501f13f4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-部门相关数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java index c1c6553ef5..7b0c61a9fd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-网格相关事实表 @@ -82,7 +80,7 @@ public class FactIndexGovrnAblityGridMonthlyEntity extends BaseEpmetEntity { /** * 网格议题转项目率 */ - private BigDecimal avgShiftProjectRatio; + private BigDecimal issueToProjectRatio; /** * 网格总项目数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java index 94eec97d6f..a104561749 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-街道及社区相关数据 @@ -70,7 +68,7 @@ public class FactIndexGovrnAblityOrgMonthlyEntity extends BaseEpmetEntity { private String yearId; /** - * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + * 数据类型 district:全区;street:街道;community:社区;grid:网格 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java index 689c396b2a..550a5ce8a1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 党建能力-党员相关的事实表 @@ -50,7 +48,7 @@ public class FactIndexPartyAblityCpcMonthlyEntity extends BaseEpmetEntity { private String agencyId; /** - * 上级组织Id + * agency_id的上级组织Id */ private String parentId; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java index 208106e87a..b38d4c4d7a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 党建能力-网格相关事实表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java index 1bf023f055..80bcce0819 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 党建能力-街道及社区相关事实表 * @@ -74,7 +71,7 @@ public class FactIndexPartyAblityOrgMonthlyEntity extends BaseEpmetEntity { private Integer publishArticleCount; /** - * 数据类型 allRegion:全区;community:社区;street:街道 + * 数据类型 district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java index d4c6aa6ab6..fedcaf1637 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 服务能力-网格相关事实表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java index 8abeb1c172..a93c7fbae4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 服务能力-组织(街道|社区|全区)相关事实表 * @@ -74,7 +71,7 @@ public class FactIndexServiceAblityOrgMonthlyEntity extends BaseEpmetEntity { private Integer activityCount; /** - * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + * 数据类型 district:全区;street:街道;community:社区;grid:网格 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java index b43e51ad7c..40a112d6d8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 社区相关-党建能力【五级权重】分数表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java index 01b0ff363f..d99cd7b506 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 社区相关分数表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java index 99bc4d0ed1..05ab819f20 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 网格相关分值 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java index 7821fbe41b..042508eae6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java @@ -1,4 +1,4 @@ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java index 299a1dca5c..e0932daeef 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java index ba9d1a3b09..8a1b94fb3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java index bedab6e7f7..0d06fe6955 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java index dcd8c63648..dfe57f7d8d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java index 6a6408f7a1..e22f7e6f2f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java index e649e5e89f..fa70f90897 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层党建-党员基本情况 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java index 96b2e23dfe..e06907ca84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java @@ -14,16 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 组织机构信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java index f020e44cd8..6fdb38f4b8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 部门信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java index 62dddc6960..19fdd132be 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 网格(党支部)信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java index 9a4d3af36b..35f4ca3ee4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层治理-难点堵点(耗时最长|设计部门最多|处理次数) * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java similarity index 98% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java index 0242ab8ce2..ea8b52cd3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java @@ -15,10 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java index fb0e81290b..8609b4f1b9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 中央区-事件数据图片数据 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java index d280785a6c..f60c612d9e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 基层治理-治理能力排行数据(按月统计) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java index fbeb83ba9a..e8d16e858d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 指数-指数数据(每月数值) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java index 259947010d..3c6b62b0e4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 指数-指数数据(按年统计) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java index abbdbb7d20..1c1a893327 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 党建引领-组织先进排行榜 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java index cb870d2de7..34ecdac955 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java @@ -14,16 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层党建-建设情况数据(支部,联建,志愿服务)按月 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java index c663fc770b..0a8d768127 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 党建引领-党员联系群众数据 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java index c542da7085..4d70bf29ff 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 党建引领|基层治理-市民(党员)积分排行榜 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java index b53561b229..a51b8b6449 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 党建引领-先锋模范数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java index 56905509ad..3f38146cc6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 公众参与-各类(话题|议题|项目|注册人数|参与人数)总数 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java index 8a2009d9ca..75668a1215 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 基层治理-公众参与 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java index bc50eaea04..c41ef72cc3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 中央区-各类(用户|党员|党群|话题|议题|项目)总数 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java index 620175e5c5..88e759af17 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -25,6 +25,9 @@ public enum IndexCodeEnum { LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz","组织内党员的联系群众能力考评分(平均值)",5), ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydsyysnlkpfpjz","组织内党员的参与议事能力考评分(平均值)",5), + XIA_SHU_SUO_YOU_WGDDJNLPJZ("xiashusuoyouwgddjnlpjz","下属所有网格的党建能力(平均值)",5), + SHE_QU_XIA_SHU_SYWGZLNLHZPJZ("shequxiashusywgzlnlhzpjz","社区下属所有网格治理能力汇总(平均值)",5), + SHE_QU_XIA_JI_SYWGFWNLDFPJZ("shequxiajisywgfwnldfpjz","社区下级所有网格服务能力得分(平均值) ",5), ; private String code; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index 9267d562a8..eef2856684 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -5,12 +5,12 @@ import com.alibaba.excel.event.AnalysisEventListener; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.UniqueIdGenerator; -import com.epmet.entity.screen.IndexDictEntity; -import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; -import com.epmet.entity.screen.IndexGroupTemplateEntity; -import com.epmet.service.screen.IndexDictService; -import com.epmet.service.screen.IndexGroupDetailTemplateService; -import com.epmet.service.screen.IndexGroupTemplateService; +import com.epmet.entity.evaluationindex.screen.IndexDictEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity; +import com.epmet.service.evaluationindex.screen.IndexDictService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailTemplateService; +import com.epmet.service.evaluationindex.screen.IndexGroupTemplateService; import com.epmet.util.Pinyin4jUtil; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -130,7 +130,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { String level4Index = index.getLevel4Index(); indexDictEntity = indexDicMap.get(level4Index); - IndexGroupTemplateEntity group2 = indexGroupMap.get(index.getLevel1Index() + level4Index); + String level4IndexDetailKey = index.getLevel1Index() + index.getLevel2Index() + level4Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(level4IndexDetailKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); @@ -138,7 +139,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setParentIndexGroupId(group1.getId()); group2.setId(UniqueIdGenerator.generate()); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); - indexGroupMap.put(index.getLevel1Index() + level4Index, group2); + indexGroupMap.put(level4IndexDetailKey, group2); //构建 分组明细 templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + level4Index); if (templateEntity == null) { @@ -154,9 +155,10 @@ public class IndexExcelDataListener extends AnalysisEventListener { } indexDictEntity = indexDicMap.get(index.getLevel5Index()); + String level5IndexDetailKey = index.getLevel1Index() + index.getLevel2Index() + index.getLevel5Index(); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); + templateEntity = indexGroupDetailMap.get(level5IndexDetailKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -165,7 +167,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); - indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); + indexGroupDetailMap.put(level5IndexDetailKey, templateEntity); } } else { //todo 测试完去掉 @@ -183,8 +185,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); String level2Index = index.getLevel2Index(); indexDictEntity = indexDicMap.get(level2Index); - String groupMapKey = index.getLevel1Index() + level2Index; - IndexGroupTemplateEntity group2 = indexGroupMap.get(groupMapKey); + String level2IndexGroupKey = index.getLevel1Index() + level2Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(level2IndexGroupKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); @@ -193,9 +195,9 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setId(UniqueIdGenerator.generate()); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); - indexGroupMap.put(groupMapKey, group2); + indexGroupMap.put(level2IndexGroupKey, group2); //构建 分组明细 - templateEntity = indexGroupDetailMap.get(level2Index); + templateEntity = indexGroupDetailMap.get(level2IndexGroupKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -204,13 +206,14 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); - indexGroupDetailMap.put(groupMapKey, templateEntity); + indexGroupDetailMap.put(level2IndexGroupKey, templateEntity); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); + String level5IndexGroupKey = index.getLevel1Index() + index.getLevel2Index() + index.getLevel5Index(); + templateEntity = indexGroupDetailMap.get(level5IndexGroupKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -219,7 +222,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); - indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); + indexGroupDetailMap.put(level5IndexGroupKey, templateEntity); } } //} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java index 2863952420..8a99d62890 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java @@ -51,4 +51,12 @@ public class IndexCodeFieldReRedis { hashOperations.putAll(RedisKeys.getIndexCodeFieldReKey(), records); redisTemplate.expire(RedisKeys.getIndexCodeFieldReKey(), 1, TimeUnit.DAYS); } + + /** + * desc:删除指标字段关系缓存 + * @return + */ + public Boolean deleteIndexCodeFromRedis() { + return redisTemplate.delete(RedisKeys.getIndexCodeFieldReKey()); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java new file mode 100644 index 0000000000..0805622937 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; + +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface AgencyScoreService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-09-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-09-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return AgencyScoreDTO + * @author generator + * @date 2020-09-02 + */ + AgencyScoreDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void save(AgencyScoreDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void update(AgencyScoreDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-09-02 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java index d65f6d43db..3cd66eccf5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.indexcal.CalculateCommonFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java new file mode 100644 index 0000000000..afb6bc40bc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java @@ -0,0 +1,39 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface DeptScoreService extends BaseService { + /** + * @return java.lang.Boolean + * @param formDTO + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java index 6648205d5c..14d2ac604c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java @@ -1,6 +1,5 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; -import com.epmet.commons.tools.utils.Result; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java new file mode 100644 index 0000000000..09d344dd47 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java @@ -0,0 +1,17 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:33 上午 + */ +public interface IndexCalculateCommunityService { + + /** + * @Description 计算社区相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/1 4:12 下午 + */ + Boolean calCommunityAll(String customerId, String monthId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java similarity index 73% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java index 70c49c77fe..a1ab0ad1bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.screen.form.IndexCalculateForm; @@ -10,7 +10,7 @@ import com.epmet.dto.screen.form.IndexCalculateForm; */ public interface IndexCalculateService { /** - * desc:计算党员相关指标 + * desc:按照客户计算所有指标(按照月份) * @param formDTO * @return */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java new file mode 100644 index 0000000000..c27b6db508 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java @@ -0,0 +1,18 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/9/2 3:11 下午 + */ +public interface IndexCalculateStreetService { + + /** + * @Description 计算街道相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/2 3:12 下午 + */ + Boolean calStreetAll(String customerId, String monthId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java index e54f182903..d2804d1dec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java new file mode 100644 index 0000000000..17f56e6895 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; +import com.epmet.service.evaluationindex.indexcal.AgencyScoreService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class AgencyScoreServiceImpl extends BaseServiceImpl implements AgencyScoreService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, AgencyScoreDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, AgencyScoreDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public AgencyScoreDTO get(String id) { + AgencyScoreEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, AgencyScoreDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index c2d8a924cb..7876c2158e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,20 +1,23 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.screen.IndexCodeFieldReDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dao.evaluationindex.screen.IndexCodeFieldReDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.entity.indexscore.CpcScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.CpcIndexCalculateService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; +import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; import com.epmet.support.normalizing.BigDecimalScoreCalculator; import com.epmet.support.normalizing.Correlation; import com.epmet.support.normalizing.ScoreCalculator; @@ -35,6 +38,7 @@ import java.util.stream.Collectors; @Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; @@ -83,38 +87,35 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { if (totalEntity == null) { totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); totalEntity.setIsTotal(NumConstant.ONE_STR); - totalEntity.setIndexCode(indexGroupDetailEntity.getIndexCode()); + totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); totalEntity.setScore(new BigDecimal(0)); cpcScoreTotalMap.put(userId, totalEntity); } - //todo 自建群活跃度——议题转项目率 有阈值 >60%按60%算 + //自建群活跃度——议题转项目率 有阈值 >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)); } }); - insertBatch(cpcScoreTotalMap.values().stream().collect(Collectors.toList())); + deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(),cpcScoreTotalMap.values().stream().collect(Collectors.toList())); } - private void insertBatch(Collection values) { + private void deleteAndInsertBatch(String customerId, String monthId, String indexCode, Collection values) { + cpcScoreDao.deleteByMonthId(customerId, monthId, indexCode); cpcScoreDao.insertBatch(values); } private void calculatePartScore(CalculateCommonFormDTO formDTO) { - Map indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); - if (CollectionUtils.isEmpty(indexCodeFieldReList)) { - log.error("cpcIndexCalculate have any indexcodefieldre"); - return; - } //计算最大最小值 Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.error("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); - return; + throw new RenException("指标原始数据记录不存在"); } //指标集合 Map> groupIndexDetailsMap = getIndexDetailMap(formDTO); if (groupIndexDetailsMap == null) { + log.error("calculatePartScore"); return; } @@ -152,7 +153,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { IndexInputVO value = entry.getValue(); String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); if (StringUtils.isBlank(fieldName)) { - log.error("cpcIndexCalculate fieldName error"); + log.error("calculateScore indexCode:{} get fieldName return blank", indexCode); continue; } @@ -179,11 +180,15 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { value.getIndexValueVOs().add(currentUserIndexValue); } } - log.warn("计算的参数:{}", indexMap); + log.info("计算的参数:{}", JSON.toJSONString(indexMap)); HashMap result = calculateScore(indexMap); - log.warn("计算的结果:{}", result); + log.info("计算的结果:{}", result); //处理结果 + if (CollectionUtils.isEmpty(result)){ + log.error("calculateScore calculateScore return empty"); + return; + } saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); } @@ -197,14 +202,14 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { */ @Transactional(rollbackFor = Exception.class) public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); + List list = new ArrayList<>(); result.forEach((userId, score) -> { CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); cpcScoreEntity.setScore(score); list.add(cpcScoreEntity); }); - this.insertBatch(list); + this.deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),parentIndexCode,list); } @@ -226,13 +231,20 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); + if (StringUtils.isBlank(fieldName)) { + continue; + } //最小值key String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); //最大值key String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); - minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); - + minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); + //如果最大值超过阈值 则最大值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(new BigDecimal(NumConstant.ONE_NEG)) == NumConstant.ONE){ + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -240,7 +252,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(),new ArrayList<>(),index.getThreshold(),index.getWeight(),scoreCalculator); + IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO); } return map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java new file mode 100644 index 0000000000..d999757956 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.DeptScoreService; +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.util.List; + + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Slf4j +@Service +public class DeptScoreServiceImpl extends BaseServiceImpl implements DeptScoreService { + @Autowired + private IndexGroupDetailService getDetailListByParentCode; + @Autowired + private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; + + /** + * @param formDTO + * @return java.lang.Boolean + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + @Override + public Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO) { + //获取指标权重 + List parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.QU_ZHI_BU_MEN.getCode(), + IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(parentIndexDetails)) { + log.warn("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【区直部门:治理能力】指标权重信息不存在"); + } + log.info(JSON.toJSONString(parentIndexDetails)); + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java similarity index 75% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 7fa8281f15..306c3c7713 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,29 +1,38 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.indexscore.GridScoreDao; -import com.epmet.dao.screen.ScreenCustomerGridDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.*; -import com.epmet.entity.indexscore.GridScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.GridCorreLationService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; -import com.epmet.support.normalizing.*; -import com.epmet.support.normalizing.batch.*; +import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.IndexOutputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -40,9 +49,10 @@ import java.util.stream.Collectors; * @author yinzuomei@elink-cn.com * @date 2020/8/26 10:35 */ +@Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class GridCorreLationServiceImpl implements GridCorreLationService { - private Logger logger = LogManager.getLogger(GridCorreLationServiceImpl.class); @Autowired private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; @Autowired @@ -76,36 +86,33 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(dangJianNengLiList)) { - logger.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:党建能力】指标权重信息不存在"); } calculateGridDangJian(formDTO, dangJianNengLiList); - //2、计算网格相关-治理能力 List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(zhiLiNengLiList)) { - logger.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); } calculateGridZhiLi(formDTO, zhiLiNengLiList); - //3、计算网格相关-服务能力 List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(fuWuNengLiList)) { - logger.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); } calculateGridFuWu(formDTO, fuWuNengLiList); - //4、计算网格相关总分 List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); if (CollectionUtils.isEmpty(wgxgList)) { - logger.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关】指标权重信息不存在"); } calculateGridTotal(formDTO, wgxgList, IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); @@ -127,16 +134,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-党建能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + } else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -155,21 +166,21 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { - //对应的数值 - String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); - //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { + log.info("index_code :{}",key); + if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { //组织内党员的联系群众能力考评分(平均值) - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); //网格内党员的联系群众能力考评分(平均值) String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO, gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); } }); }); @@ -180,6 +191,31 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), NumConstant.ZERO_STR); } + /** + * @param formDTO + * @param indexCode + * @return void + * @author yinzuomei + * @description 只有一条事实记录时,分值默认赋50 + * @Date 2020/9/2 14:35 + **/ + private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) { + List> resultMapList = new ArrayList<>(); + HashMap resultMap = new HashMap<>(); + String gridId =null; + if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexPartyAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.ZHI_LI_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexGovrnAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.FU_WU_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexServiceAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } + resultMap.put(gridId, new BigDecimal(NumConstant.FIFTY_STR)); + resultMapList.add(resultMap); + // 保存中间表 + saveGridCorreLationResult(formDTO, resultMapList, indexCode, NumConstant.ZERO_STR); + } + /** * @param calculateCommonFormDTO * @return java.util.Map @@ -199,6 +235,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + //FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("24.35")); + map.put(StrConstant.MAX, new BigDecimal("46.13"));*/ return map; } @@ -215,6 +254,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("24.43"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("46.13"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("24.35"); + }*/ return result; } @@ -231,6 +279,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("29.40"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("18.30"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("9.15"); + }*/ return result; } @@ -253,6 +310,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + // FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("9.15")); + map.put(StrConstant.MAX, new BigDecimal("29.4"));*/ return map; } @@ -275,7 +335,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { String yearId = DateUtils.getYearId(formDTO.getMonthId()); for (HashMap resultMap : resultMapList) { resultMap.forEach((gridId, partyAblityScore) -> { - logger.info("网格id:" + gridId + ";分值:" + partyAblityScore); + log.info("网格id:" + gridId + ";index_Code:"+indexCode+";分值:" + partyAblityScore); GridScoreEntity gridScoreEntity = new GridScoreEntity(); gridScoreEntity.setCustomerId(formDTO.getCustomerId()); gridScoreEntity.setGridId(gridId); @@ -283,8 +343,12 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setIndexCode(indexCode); ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(formDTO.getCustomerId(), gridId); if (null != screenCustomerGridDTO) { - gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); - gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + if(StringUtils.isNotBlank(screenCustomerGridDTO.getParentAgencyId())){ + gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); + } + if(StringUtils.isNotBlank(screenCustomerGridDTO.getAllParentIds())){ + gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + } } gridScoreEntity.setQuarterId(quarterId); gridScoreEntity.setYearId(yearId); @@ -309,10 +373,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); - logger.info("计算的参数:{}", indexInputVOS); + log.info("计算的参数"+JSON.toJSONString(indexInputVOS)); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + + //如果想看每一个指标的分值调用下面的方法 + List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + log.info("计算的结果(List)"+JSON.toJSONString(listTemp)); + HashMap resultMap = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - logger.info("计算的结果:{}", resultMap); + log.info("计算的结果{}", resultMap); return resultMap; } @@ -344,23 +413,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private Map> buildGridCorrelationIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); for (IndexGroupDetailEntity index : indexList) { -// IndexInputVO indexInputVO = new IndexInputVO(); - // 指标code -// indexInputVO.setIndexId(index.getIndexCode()); - //阈值 -// indexInputVO.setThreshold(index.getThreshold()); - //权重 -// indexInputVO.setWeight(index.getWeight()); BigDecimal minValue = null; BigDecimal maxValue = null; if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { //组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值 - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); Map contactMassesAblityMap = this.getContactMassesAblityMap(formDTO); minValue = contactMassesAblityMap.get(StrConstant.MIN); maxValue = contactMassesAblityMap.get(StrConstant.MAX); } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(index.getIndexCode())) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); Map joinIssueAblityMap = this.getJoinIssueAblityMap(formDTO); minValue = joinIssueAblityMap.get(StrConstant.MIN); maxValue = joinIssueAblityMap.get(StrConstant.MAX); @@ -368,15 +430,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); if (StringUtils.isBlank(fieldName)) { - logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); + log.error("index_code:{} not find field_name",index.getIndexCode()); continue; } - logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); +// log.info("index_code2:{} ,field_name:{}",index.getIndexCode(),fieldName); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); } + //有阈值,且最大值>阈值,则最大值赋值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG_STR).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(index.getThreshold()) == NumConstant.ONE) { + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -384,12 +451,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); -// indexInputVO.setScoreCalculator(scoreCalculator); List> sampleValueList = new ArrayList<>(); -// indexInputVO.setIndexValueVOs(sampleValueList); IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), sampleValueList, index.getThreshold(), +// new BigDecimal("-1"),//FOR TEST index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO1); @@ -409,16 +475,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -437,19 +507,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); + String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); + BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); + SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); + value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); //构造样本值对象 SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); - String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); - BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); - SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); - value.getIndexValueVOs().add(contactMassesAblityValue); } }); }); @@ -471,18 +540,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private void calculateGridFuWu(CalculateCommonFormDTO formDTO, List indexList) { //查询总记录数 - int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); + int total = factIndexServiceAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -501,7 +574,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); @@ -509,7 +581,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); } else { - logger.error("index_code:" + key + " not find field_name"); + log.error("index_code:" + key + " not find field_name"); } }); }); @@ -532,25 +604,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 List gridScoreDTOList = gridScoreDao.selectList(formDTO); if(CollectionUtils.isEmpty(gridScoreDTOList)){ - logger.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); + log.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); throw new RenException("客户一级指标分值记录不存在"); } Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List gridScoreEntityList = new ArrayList<>(); for (GridScoreDTO gridScoreDTO : gridScoreDTOList) { - GridScoreEntity gridScoreEntity = new GridScoreEntity(); - gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); - gridScoreEntity.setGridId(gridScoreDTO.getGridId()); + GridScoreEntity gridScoreEntity = ConvertUtils.sourceToTarget(gridScoreDTO, GridScoreEntity.class); gridScoreEntity.setIsTotal(NumConstant.ONE_STR); gridScoreEntity.setIndexCode(indexCode); - gridScoreEntity.setAgencyId(gridScoreDTO.getAgencyId()); - gridScoreEntity.setAllParentIds(gridScoreDTO.getAllParentIds()); - gridScoreEntity.setQuarterId(gridScoreDTO.getQuarterId()); - gridScoreEntity.setYearId(gridScoreDTO.getYearId()); - gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); gridScoreEntity.setScore(BigDecimal.ZERO); if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { - logger.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); + log.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); continue; } for (GridScoreDetailDTO gridScoreDetailDTO : gridScoreDTO.getDetailList()) { @@ -565,14 +630,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } } - public static void main(String[] args) { - BigDecimal totalScore = BigDecimal.ZERO; - for (int i = 1; i < 5; i++) { - totalScore = totalScore.add(new BigDecimal("1.00")); - } - System.out.println(totalScore); - } - /** * @param customerId * @return com.epmet.dto.indexcal.CustomerGridInfoDTO diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java new file mode 100644 index 0000000000..229c3059de --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -0,0 +1,428 @@ +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.druid.util.StringUtils; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao; +import com.epmet.dao.evaluationindex.screen.FactIndexGridScoreDao; +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; +import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; +import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; +import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; +import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:34 上午 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommunityService { + + @Autowired + private FactIndexPartyAblityOrgMonthlyDao factIndexPartyAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityOrgMonthlyDao factIndexGovrnAblityOrgMonthlyDao; + @Autowired + private FactIndexServiceAblityOrgMonthlyDao factIndexServiceAblityOrgMonthlyDao; + @Autowired + private IndexGroupDetailService indexGroupDetailService; + @Autowired + private IndexCodeFieldReService indexCodeFieldReService; + @Autowired + private FactIndexCommunityScoreDao factIndexCommunityScoreDao; + @Autowired + private FactIndexGridScoreDao factIndexGridScoreDao; + + /** + * @param customerId + * @Description 社区名义发文数量计算【党建能力】 + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityPartyCalculate(String customerId, String monthId) { + // 党建能力 + // 根据all_parent_index_code 获取指标明细 + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + //下属所有网格的党建能力平均值 + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(customerId, monthId); + if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { + log.error("查询下属所有网格的党建能力平均值集合为空"); + return; + }else if (subGridPartyAvgScore.size() == NumConstant.ONE){ + sizeOne(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (subGridPartyAvgScore.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexEnd = NumConstant.TEN; + List> partition = ListUtils.partition(subGridPartyAvgScore, indexEnd); + partition.forEach(publish -> { + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 社区名义发文数量 + List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(mapList)) { + log.error("查询社区名义发文数量集合为空"); + return; + } + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + }else if (mapList.size() == NumConstant.ONE){ + sizeOne(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (mapList.size() > NumConstant.ONE) { + List decimalList = mapList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> publishArticleList = ListUtils.partition(mapList, 10); + publishArticleList.forEach(publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区治理能力 + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityGovernAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridGovernAvgScore(customerId, monthId); + if (subGridGovernAvg.size() == NumConstant.ONE) { + sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (subGridGovernAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(subGridGovernAvg, 10); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 治理能力的六个五级指标 + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityGovernAbility)){ + log.error("查询治理能力的六个五级指标集合为空"); + return; + }else if (communityGovernAbility.size() == NumConstant.ONE) { + sizeOne(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (communityGovernAbility.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> governAbilityList = ListUtils.partition(communityGovernAbility, 10); + governAbilityList.forEach(governAbility -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + governAbility.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区服务能力 + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityServiceAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + String indexCode = detail.getIndexCode(); + if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); + if (subGridServiceAvg.size() == NumConstant.ONE) { + sizeOne(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId().toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (subGridServiceAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10); + serviceAvgList.forEach(serviceAvg -> { + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + serviceAvg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } else { + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityActivityCountList)) { + log.error("查询社区活动组织次数集合为空"); + return; + }else if (communityActivityCountList.size() == NumConstant.ONE) { + sizeOne(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (communityActivityCountList.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> communityActivityList = ListUtils.partition(communityActivityCountList, 10); + communityActivityList.forEach(communityActivity -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + communityActivity.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.FU_WU_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区相关计算 + * @author zxc + * @date 2020/9/1 9:21 上午 + */ + public Boolean communityRelate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List
+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Mapper +public interface AgencyScoreDao extends BaseDao { + + /** + * @Description 【街道】中间表插入 + * @param lists + * @author zxc + * @date 2020/8/27 5:05 下午 + */ + void insertStreetRecord(@Param("lists") List lists); + + /** + * @Description 删除旧记录 + * @param customerId + * @param monthId + * @param indexCode + * @author zxc + * @date 2020/9/2 15:47 + */ + void deleteOldRecord(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("dataType")String dataType); + + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java index 2142128e3b..9c3d339ae8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/CpcScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CpcScoreDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexscore; +package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.entity.indexscore.CpcScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java new file mode 100644 index 0000000000..4f670bbfe2 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/DeptScoreDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Mapper +public interface DeptScoreDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java index 71316cf4f4..2e4a10cde2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java @@ -15,12 +15,12 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexscore; +package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.GridScoreDTO; -import com.epmet.entity.indexscore.GridScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java index f56638a3f6..5db8adb014 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java @@ -1,4 +1,4 @@ -package com.epmet.dao.indexcoll; /** +package com.epmet.dao.evaluationindex.indexcoll; /** * Copyright 2018 人人开源 https://www.renren.io * * This program is free software: you can redistribute it and/or modify @@ -18,7 +18,7 @@ package com.epmet.dao.indexcoll; /** import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.DeptGovrnAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java index b3002609d1..55d0e5730b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcollect.form.GridGovrnAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -91,8 +91,17 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao. */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgGovrnAbilityFormDTO; -import com.epmet.dto.screen.result.CommunityGovernAbilityResultDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -71,5 +70,5 @@ public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao> selectCommunityGovernAbility(@Param("customerId")String customerId, @Param("monthId")String monthId); + List> selectCommunityGovernAbility(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index cdecd48f51..c23bf91b4c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.GridPartyMemberDataFormDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java index a2fe8dc821..aeaf65e6b5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java @@ -15,14 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; -import com.epmet.dto.indexcollect.FactIndexPartyAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridPartyAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -88,5 +87,21 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao selectPartyAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + /** + * @return java.lang.Integer + * @param formDTO + * @author yinzuomei + * @description 查询(党建能力-网格相关事实表) 这个月共上传记录数 + * @Date 2020/9/2 14:28 + **/ Integer selectCount(CalculateCommonFormDTO formDTO); + + /** + * @return java.lang.String + * @param formDTO + * @author yinzuomei + * @description 场景:客户这个月只上传了一个网格的事实记录 + * @Date 2020/9/2 14:45 + **/ + String selectTheOneGrid(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index 144ecd1d0a..44d3a19638 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -15,16 +15,17 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgPartyAbilityFormDTO; import com.epmet.dto.screen.result.CommunityPublishArticleCountResultDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 党建能力-街道及社区相关事实表 @@ -72,4 +73,13 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao selectPublishArticleCount(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * @Description 查询社区下的发文数 Map + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/26 10:49 上午 + */ + List> selectPublishArticleCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java similarity index 82% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java index 7357c0cedc..ca2489ba6f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; -import com.epmet.dto.indexcollect.FactIndexServiceAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridServiceAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexServiceAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -85,4 +85,22 @@ public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao selectServiceAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * @return int + * @param formDTO + * @author yinzuomei + * @description 查询(服务能力-网格相关事实表)共上传记录数 + * @Date 2020/9/2 14:28 + **/ + int selectCount(CalculateCommonFormDTO formDTO); + + /** + * @return java.lang.String + * @param formDTO + * @author yinzuomei + * @description 场景:客户这个月只上传了一个网格的事实记录 + * @Date 2020/9/2 14:46 + **/ + String selectTheOneGrid(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java index 261fb8b945..b17ad01eea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java @@ -15,17 +15,17 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgServiceAbilityFormDTO; import com.epmet.dto.screen.result.CommunityActivityCountResultDTO; -import com.epmet.dto.screen.result.CommunityPublishArticleCountResultDTO; -import com.epmet.entity.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 服务能力-组织(街道|社区|全区)相关事实表 @@ -73,4 +73,14 @@ public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao selectActivityCount(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * @Description 社区活动组织次数 + * @param customerId + * @param monthId + * @param level + * @author zxc + * @date 2020/9/2 2:09 下午 + */ + List> selectActivityCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java similarity index 91% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java index 607132ea18..189afc8e84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; -import com.epmet.entity.screen.FactIndexCommunityScoreEntity; +import com.epmet.entity.evaluationindex.screen.FactIndexCommunityScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -35,7 +35,7 @@ import java.util.List; public interface FactIndexCommunityScoreDao extends BaseDao { /** - * @Description 党建能力【社区】中间表插入 + * @Description 【社区】中间表插入 * @param lists * @author zxc * @date 2020/8/27 5:05 下午 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java index 223a297db4..96ba8f3c9f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; -import com.epmet.entity.screen.FactIndexGridScoreEntity; +import com.epmet.entity.evaluationindex.screen.FactIndexGridScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java similarity index 68% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java index 25e10869ed..4289caf4db 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java @@ -1,7 +1,7 @@ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexCodeFieldReEntity; +import com.epmet.entity.evaluationindex.screen.IndexCodeFieldReEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java index 7aa2ab9733..780fabd1d2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexDictEntity; +import com.epmet.entity.evaluationindex.screen.IndexDictEntity; import org.apache.ibatis.annotations.Mapper; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java index 5458720940..26cb71f2ec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupEntity; import org.apache.ibatis.annotations.Mapper; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java index 8982bc5f29..b22d6a4a71 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java index 29f074c13f..eb0c0b260a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java index c1e14b531c..0e1b5a2a06 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java index 12271b8e3c..8cd75faff7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CpcBaseDataFormDTO; -import com.epmet.entity.screen.ScreenCpcBaseDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCpcBaseDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index d7851cd754..f0d189f7ea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -15,12 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CustomerAgencyFormDTO; -import com.epmet.dto.screencoll.form.CustomerGridFormDTO; -import com.epmet.entity.screen.ScreenCustomerAgencyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java index 53f37049a3..00baee166f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CustomerDeptFormDTO; -import com.epmet.entity.screen.ScreenCustomerDeptEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java index b826b7cbcc..4254712cbf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.screencoll.form.CustomerGridFormDTO; -import com.epmet.entity.screen.ScreenCustomerGridEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java index 1a9b991bac..21eaa80280 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.DifficultyDataFormDTO; -import com.epmet.entity.screen.ScreenDifficultyDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java index ec80809c55..14c0153f62 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.EventDataFormDTO; -import com.epmet.entity.screen.ScreenEventDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenEventDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java similarity index 91% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java index 42ca86859e..835b1f112d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.ScreenEventImgDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenEventImgDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java index ea3d67aa68..3dca5cc281 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.GovernRankDataFormDTO; -import com.epmet.entity.screen.ScreenGovernRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenGovernRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index e97406febf..a38ff1cbe6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO; -import com.epmet.entity.screen.ScreenIndexDataMonthlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenIndexDataMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java index 4ca64f6944..bb2a5eeb6e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.IndexDataYearlyFormDTO; -import com.epmet.entity.screen.ScreenIndexDataYearlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenIndexDataYearlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java index 4eabfd508a..00b4599fe4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.OrgRankDataFormDTO; -import com.epmet.entity.screen.ScreenOrgRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenOrgRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java index 3cae4a160d..3f2de14703 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyBranchDataFormDTO; -import com.epmet.entity.screen.ScreenPartyBranchDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyBranchDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java index 276b08e356..931c05c6bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyLinkMassesDataFormDTO; -import com.epmet.entity.screen.ScreenPartyLinkMassesDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyLinkMassesDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java index 9e43669618..e1f527f47d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyUserRankDataFormDTO; -import com.epmet.entity.screen.ScreenPartyUserRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java index 202fc4aa59..b50d74b1a9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PioneerDataFormDTO; -import com.epmet.entity.screen.ScreenPioneerDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java index a4fdc9f221..5bc9ea4130 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PublicPartiTotalDataFormDTO; -import com.epmet.entity.screen.ScreenPublicPartiTotalDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPublicPartiTotalDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java index 69422c07c4..a620008b22 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.ScreenUserJoinEntity; +import com.epmet.entity.evaluationindex.screen.ScreenUserJoinEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java index e0712dee50..5595259af6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.UserTotalDataFormDTO; -import com.epmet.entity.screen.ScreenUserTotalDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java new file mode 100644 index 0000000000..879018ac99 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java @@ -0,0 +1,90 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.evaluationindex.indexcal; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_agency_score") +public class AgencyScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织id(eg:社区或者街道id) + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentAgencyId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan + */ + private String indexCode; + + /** + * 数据类型 district :全区;street:街道 + */ + private String dataType; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java index cca1b90ff2..0b21c5de92 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexscore; +package com.epmet.entity.evaluationindex.indexcal; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java new file mode 100644 index 0000000000..8517c59ff1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java @@ -0,0 +1,85 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.evaluationindex.indexcal; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_dept_score") +public class DeptScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 部门id + */ + private String deptId; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 治理能力:zhilinengli; + */ + private String indexCode; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java index 9b1bdf2f73..781dca54bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexscore; +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; -import java.util.Date; /** * 网格相关分值 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java index 24827756fa..47501f13f4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-部门相关数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java index c1c6553ef5..7b0c61a9fd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-网格相关事实表 @@ -82,7 +80,7 @@ public class FactIndexGovrnAblityGridMonthlyEntity extends BaseEpmetEntity { /** * 网格议题转项目率 */ - private BigDecimal avgShiftProjectRatio; + private BigDecimal issueToProjectRatio; /** * 网格总项目数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java index 94eec97d6f..a104561749 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-街道及社区相关数据 @@ -70,7 +68,7 @@ public class FactIndexGovrnAblityOrgMonthlyEntity extends BaseEpmetEntity { private String yearId; /** - * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + * 数据类型 district:全区;street:街道;community:社区;grid:网格 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java index 689c396b2a..550a5ce8a1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 党建能力-党员相关的事实表 @@ -50,7 +48,7 @@ public class FactIndexPartyAblityCpcMonthlyEntity extends BaseEpmetEntity { private String agencyId; /** - * 上级组织Id + * agency_id的上级组织Id */ private String parentId; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java index 208106e87a..b38d4c4d7a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 党建能力-网格相关事实表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java index 1bf023f055..80bcce0819 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 党建能力-街道及社区相关事实表 * @@ -74,7 +71,7 @@ public class FactIndexPartyAblityOrgMonthlyEntity extends BaseEpmetEntity { private Integer publishArticleCount; /** - * 数据类型 allRegion:全区;community:社区;street:街道 + * 数据类型 district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java index d4c6aa6ab6..fedcaf1637 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 服务能力-网格相关事实表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java index 8abeb1c172..a93c7fbae4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 服务能力-组织(街道|社区|全区)相关事实表 * @@ -74,7 +71,7 @@ public class FactIndexServiceAblityOrgMonthlyEntity extends BaseEpmetEntity { private Integer activityCount; /** - * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + * 数据类型 district:全区;street:街道;community:社区;grid:网格 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java index b43e51ad7c..40a112d6d8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 社区相关-党建能力【五级权重】分数表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java index 01b0ff363f..d99cd7b506 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 社区相关分数表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java index 99bc4d0ed1..05ab819f20 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 网格相关分值 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java index 7821fbe41b..042508eae6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java @@ -1,4 +1,4 @@ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java index 299a1dca5c..e0932daeef 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java index ba9d1a3b09..8a1b94fb3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java index bedab6e7f7..0d06fe6955 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java index dcd8c63648..dfe57f7d8d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java index 6a6408f7a1..e22f7e6f2f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java index e649e5e89f..fa70f90897 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层党建-党员基本情况 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java index 96b2e23dfe..e06907ca84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java @@ -14,16 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 组织机构信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java index f020e44cd8..6fdb38f4b8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 部门信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java index 62dddc6960..19fdd132be 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 网格(党支部)信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java index 9a4d3af36b..35f4ca3ee4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层治理-难点堵点(耗时最长|设计部门最多|处理次数) * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java similarity index 98% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java index 0242ab8ce2..ea8b52cd3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java @@ -15,10 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java index fb0e81290b..8609b4f1b9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 中央区-事件数据图片数据 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java index d280785a6c..f60c612d9e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 基层治理-治理能力排行数据(按月统计) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java index fbeb83ba9a..e8d16e858d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 指数-指数数据(每月数值) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java index 259947010d..3c6b62b0e4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 指数-指数数据(按年统计) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java index abbdbb7d20..1c1a893327 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 党建引领-组织先进排行榜 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java index cb870d2de7..34ecdac955 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java @@ -14,16 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层党建-建设情况数据(支部,联建,志愿服务)按月 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java index c663fc770b..0a8d768127 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 党建引领-党员联系群众数据 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java index c542da7085..4d70bf29ff 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 党建引领|基层治理-市民(党员)积分排行榜 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java index b53561b229..a51b8b6449 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 党建引领-先锋模范数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java index 56905509ad..3f38146cc6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 公众参与-各类(话题|议题|项目|注册人数|参与人数)总数 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java index 8a2009d9ca..75668a1215 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 基层治理-公众参与 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java index bc50eaea04..c41ef72cc3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 中央区-各类(用户|党员|党群|话题|议题|项目)总数 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java index 620175e5c5..88e759af17 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -25,6 +25,9 @@ public enum IndexCodeEnum { LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz","组织内党员的联系群众能力考评分(平均值)",5), ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydsyysnlkpfpjz","组织内党员的参与议事能力考评分(平均值)",5), + XIA_SHU_SUO_YOU_WGDDJNLPJZ("xiashusuoyouwgddjnlpjz","下属所有网格的党建能力(平均值)",5), + SHE_QU_XIA_SHU_SYWGZLNLHZPJZ("shequxiashusywgzlnlhzpjz","社区下属所有网格治理能力汇总(平均值)",5), + SHE_QU_XIA_JI_SYWGFWNLDFPJZ("shequxiajisywgfwnldfpjz","社区下级所有网格服务能力得分(平均值) ",5), ; private String code; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index 9267d562a8..eef2856684 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -5,12 +5,12 @@ import com.alibaba.excel.event.AnalysisEventListener; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.UniqueIdGenerator; -import com.epmet.entity.screen.IndexDictEntity; -import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; -import com.epmet.entity.screen.IndexGroupTemplateEntity; -import com.epmet.service.screen.IndexDictService; -import com.epmet.service.screen.IndexGroupDetailTemplateService; -import com.epmet.service.screen.IndexGroupTemplateService; +import com.epmet.entity.evaluationindex.screen.IndexDictEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity; +import com.epmet.service.evaluationindex.screen.IndexDictService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailTemplateService; +import com.epmet.service.evaluationindex.screen.IndexGroupTemplateService; import com.epmet.util.Pinyin4jUtil; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -130,7 +130,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { String level4Index = index.getLevel4Index(); indexDictEntity = indexDicMap.get(level4Index); - IndexGroupTemplateEntity group2 = indexGroupMap.get(index.getLevel1Index() + level4Index); + String level4IndexDetailKey = index.getLevel1Index() + index.getLevel2Index() + level4Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(level4IndexDetailKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); @@ -138,7 +139,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setParentIndexGroupId(group1.getId()); group2.setId(UniqueIdGenerator.generate()); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); - indexGroupMap.put(index.getLevel1Index() + level4Index, group2); + indexGroupMap.put(level4IndexDetailKey, group2); //构建 分组明细 templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + level4Index); if (templateEntity == null) { @@ -154,9 +155,10 @@ public class IndexExcelDataListener extends AnalysisEventListener { } indexDictEntity = indexDicMap.get(index.getLevel5Index()); + String level5IndexDetailKey = index.getLevel1Index() + index.getLevel2Index() + index.getLevel5Index(); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); + templateEntity = indexGroupDetailMap.get(level5IndexDetailKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -165,7 +167,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); - indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); + indexGroupDetailMap.put(level5IndexDetailKey, templateEntity); } } else { //todo 测试完去掉 @@ -183,8 +185,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); String level2Index = index.getLevel2Index(); indexDictEntity = indexDicMap.get(level2Index); - String groupMapKey = index.getLevel1Index() + level2Index; - IndexGroupTemplateEntity group2 = indexGroupMap.get(groupMapKey); + String level2IndexGroupKey = index.getLevel1Index() + level2Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(level2IndexGroupKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); @@ -193,9 +195,9 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setId(UniqueIdGenerator.generate()); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); - indexGroupMap.put(groupMapKey, group2); + indexGroupMap.put(level2IndexGroupKey, group2); //构建 分组明细 - templateEntity = indexGroupDetailMap.get(level2Index); + templateEntity = indexGroupDetailMap.get(level2IndexGroupKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -204,13 +206,14 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); - indexGroupDetailMap.put(groupMapKey, templateEntity); + indexGroupDetailMap.put(level2IndexGroupKey, templateEntity); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); + String level5IndexGroupKey = index.getLevel1Index() + index.getLevel2Index() + index.getLevel5Index(); + templateEntity = indexGroupDetailMap.get(level5IndexGroupKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -219,7 +222,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); - indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); + indexGroupDetailMap.put(level5IndexGroupKey, templateEntity); } } //} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java index 2863952420..8a99d62890 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java @@ -51,4 +51,12 @@ public class IndexCodeFieldReRedis { hashOperations.putAll(RedisKeys.getIndexCodeFieldReKey(), records); redisTemplate.expire(RedisKeys.getIndexCodeFieldReKey(), 1, TimeUnit.DAYS); } + + /** + * desc:删除指标字段关系缓存 + * @return + */ + public Boolean deleteIndexCodeFromRedis() { + return redisTemplate.delete(RedisKeys.getIndexCodeFieldReKey()); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java new file mode 100644 index 0000000000..0805622937 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; + +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface AgencyScoreService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-09-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-09-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return AgencyScoreDTO + * @author generator + * @date 2020-09-02 + */ + AgencyScoreDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void save(AgencyScoreDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void update(AgencyScoreDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-09-02 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java index d65f6d43db..3cd66eccf5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.indexcal.CalculateCommonFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java new file mode 100644 index 0000000000..afb6bc40bc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java @@ -0,0 +1,39 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface DeptScoreService extends BaseService { + /** + * @return java.lang.Boolean + * @param formDTO + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java index 6648205d5c..14d2ac604c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java @@ -1,6 +1,5 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; -import com.epmet.commons.tools.utils.Result; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java new file mode 100644 index 0000000000..09d344dd47 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java @@ -0,0 +1,17 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:33 上午 + */ +public interface IndexCalculateCommunityService { + + /** + * @Description 计算社区相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/1 4:12 下午 + */ + Boolean calCommunityAll(String customerId, String monthId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java similarity index 73% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java index 70c49c77fe..a1ab0ad1bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.screen.form.IndexCalculateForm; @@ -10,7 +10,7 @@ import com.epmet.dto.screen.form.IndexCalculateForm; */ public interface IndexCalculateService { /** - * desc:计算党员相关指标 + * desc:按照客户计算所有指标(按照月份) * @param formDTO * @return */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java new file mode 100644 index 0000000000..c27b6db508 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java @@ -0,0 +1,18 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/9/2 3:11 下午 + */ +public interface IndexCalculateStreetService { + + /** + * @Description 计算街道相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/2 3:12 下午 + */ + Boolean calStreetAll(String customerId, String monthId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java index e54f182903..d2804d1dec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java new file mode 100644 index 0000000000..17f56e6895 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; +import com.epmet.service.evaluationindex.indexcal.AgencyScoreService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class AgencyScoreServiceImpl extends BaseServiceImpl implements AgencyScoreService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, AgencyScoreDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, AgencyScoreDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public AgencyScoreDTO get(String id) { + AgencyScoreEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, AgencyScoreDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index c2d8a924cb..7876c2158e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,20 +1,23 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.screen.IndexCodeFieldReDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dao.evaluationindex.screen.IndexCodeFieldReDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.entity.indexscore.CpcScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.CpcIndexCalculateService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; +import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; import com.epmet.support.normalizing.BigDecimalScoreCalculator; import com.epmet.support.normalizing.Correlation; import com.epmet.support.normalizing.ScoreCalculator; @@ -35,6 +38,7 @@ import java.util.stream.Collectors; @Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; @@ -83,38 +87,35 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { if (totalEntity == null) { totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); totalEntity.setIsTotal(NumConstant.ONE_STR); - totalEntity.setIndexCode(indexGroupDetailEntity.getIndexCode()); + totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); totalEntity.setScore(new BigDecimal(0)); cpcScoreTotalMap.put(userId, totalEntity); } - //todo 自建群活跃度——议题转项目率 有阈值 >60%按60%算 + //自建群活跃度——议题转项目率 有阈值 >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)); } }); - insertBatch(cpcScoreTotalMap.values().stream().collect(Collectors.toList())); + deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(),cpcScoreTotalMap.values().stream().collect(Collectors.toList())); } - private void insertBatch(Collection values) { + private void deleteAndInsertBatch(String customerId, String monthId, String indexCode, Collection values) { + cpcScoreDao.deleteByMonthId(customerId, monthId, indexCode); cpcScoreDao.insertBatch(values); } private void calculatePartScore(CalculateCommonFormDTO formDTO) { - Map indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); - if (CollectionUtils.isEmpty(indexCodeFieldReList)) { - log.error("cpcIndexCalculate have any indexcodefieldre"); - return; - } //计算最大最小值 Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.error("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); - return; + throw new RenException("指标原始数据记录不存在"); } //指标集合 Map> groupIndexDetailsMap = getIndexDetailMap(formDTO); if (groupIndexDetailsMap == null) { + log.error("calculatePartScore"); return; } @@ -152,7 +153,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { IndexInputVO value = entry.getValue(); String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); if (StringUtils.isBlank(fieldName)) { - log.error("cpcIndexCalculate fieldName error"); + log.error("calculateScore indexCode:{} get fieldName return blank", indexCode); continue; } @@ -179,11 +180,15 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { value.getIndexValueVOs().add(currentUserIndexValue); } } - log.warn("计算的参数:{}", indexMap); + log.info("计算的参数:{}", JSON.toJSONString(indexMap)); HashMap result = calculateScore(indexMap); - log.warn("计算的结果:{}", result); + log.info("计算的结果:{}", result); //处理结果 + if (CollectionUtils.isEmpty(result)){ + log.error("calculateScore calculateScore return empty"); + return; + } saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); } @@ -197,14 +202,14 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { */ @Transactional(rollbackFor = Exception.class) public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); + List list = new ArrayList<>(); result.forEach((userId, score) -> { CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); cpcScoreEntity.setScore(score); list.add(cpcScoreEntity); }); - this.insertBatch(list); + this.deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),parentIndexCode,list); } @@ -226,13 +231,20 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); + if (StringUtils.isBlank(fieldName)) { + continue; + } //最小值key String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); //最大值key String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); - minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); - + minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); + //如果最大值超过阈值 则最大值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(new BigDecimal(NumConstant.ONE_NEG)) == NumConstant.ONE){ + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -240,7 +252,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(),new ArrayList<>(),index.getThreshold(),index.getWeight(),scoreCalculator); + IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO); } return map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java new file mode 100644 index 0000000000..d999757956 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.DeptScoreService; +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.util.List; + + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Slf4j +@Service +public class DeptScoreServiceImpl extends BaseServiceImpl implements DeptScoreService { + @Autowired + private IndexGroupDetailService getDetailListByParentCode; + @Autowired + private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; + + /** + * @param formDTO + * @return java.lang.Boolean + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + @Override + public Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO) { + //获取指标权重 + List parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.QU_ZHI_BU_MEN.getCode(), + IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(parentIndexDetails)) { + log.warn("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【区直部门:治理能力】指标权重信息不存在"); + } + log.info(JSON.toJSONString(parentIndexDetails)); + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java similarity index 75% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 7fa8281f15..306c3c7713 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,29 +1,38 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.indexscore.GridScoreDao; -import com.epmet.dao.screen.ScreenCustomerGridDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.*; -import com.epmet.entity.indexscore.GridScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.GridCorreLationService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; -import com.epmet.support.normalizing.*; -import com.epmet.support.normalizing.batch.*; +import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.IndexOutputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -40,9 +49,10 @@ import java.util.stream.Collectors; * @author yinzuomei@elink-cn.com * @date 2020/8/26 10:35 */ +@Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class GridCorreLationServiceImpl implements GridCorreLationService { - private Logger logger = LogManager.getLogger(GridCorreLationServiceImpl.class); @Autowired private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; @Autowired @@ -76,36 +86,33 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(dangJianNengLiList)) { - logger.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:党建能力】指标权重信息不存在"); } calculateGridDangJian(formDTO, dangJianNengLiList); - //2、计算网格相关-治理能力 List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(zhiLiNengLiList)) { - logger.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); } calculateGridZhiLi(formDTO, zhiLiNengLiList); - //3、计算网格相关-服务能力 List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(fuWuNengLiList)) { - logger.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); } calculateGridFuWu(formDTO, fuWuNengLiList); - //4、计算网格相关总分 List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); if (CollectionUtils.isEmpty(wgxgList)) { - logger.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关】指标权重信息不存在"); } calculateGridTotal(formDTO, wgxgList, IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); @@ -127,16 +134,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-党建能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + } else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -155,21 +166,21 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { - //对应的数值 - String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); - //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { + log.info("index_code :{}",key); + if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { //组织内党员的联系群众能力考评分(平均值) - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); //网格内党员的联系群众能力考评分(平均值) String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO, gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); } }); }); @@ -180,6 +191,31 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), NumConstant.ZERO_STR); } + /** + * @param formDTO + * @param indexCode + * @return void + * @author yinzuomei + * @description 只有一条事实记录时,分值默认赋50 + * @Date 2020/9/2 14:35 + **/ + private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) { + List> resultMapList = new ArrayList<>(); + HashMap resultMap = new HashMap<>(); + String gridId =null; + if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexPartyAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.ZHI_LI_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexGovrnAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.FU_WU_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexServiceAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } + resultMap.put(gridId, new BigDecimal(NumConstant.FIFTY_STR)); + resultMapList.add(resultMap); + // 保存中间表 + saveGridCorreLationResult(formDTO, resultMapList, indexCode, NumConstant.ZERO_STR); + } + /** * @param calculateCommonFormDTO * @return java.util.Map @@ -199,6 +235,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + //FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("24.35")); + map.put(StrConstant.MAX, new BigDecimal("46.13"));*/ return map; } @@ -215,6 +254,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("24.43"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("46.13"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("24.35"); + }*/ return result; } @@ -231,6 +279,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("29.40"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("18.30"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("9.15"); + }*/ return result; } @@ -253,6 +310,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + // FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("9.15")); + map.put(StrConstant.MAX, new BigDecimal("29.4"));*/ return map; } @@ -275,7 +335,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { String yearId = DateUtils.getYearId(formDTO.getMonthId()); for (HashMap resultMap : resultMapList) { resultMap.forEach((gridId, partyAblityScore) -> { - logger.info("网格id:" + gridId + ";分值:" + partyAblityScore); + log.info("网格id:" + gridId + ";index_Code:"+indexCode+";分值:" + partyAblityScore); GridScoreEntity gridScoreEntity = new GridScoreEntity(); gridScoreEntity.setCustomerId(formDTO.getCustomerId()); gridScoreEntity.setGridId(gridId); @@ -283,8 +343,12 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setIndexCode(indexCode); ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(formDTO.getCustomerId(), gridId); if (null != screenCustomerGridDTO) { - gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); - gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + if(StringUtils.isNotBlank(screenCustomerGridDTO.getParentAgencyId())){ + gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); + } + if(StringUtils.isNotBlank(screenCustomerGridDTO.getAllParentIds())){ + gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + } } gridScoreEntity.setQuarterId(quarterId); gridScoreEntity.setYearId(yearId); @@ -309,10 +373,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); - logger.info("计算的参数:{}", indexInputVOS); + log.info("计算的参数"+JSON.toJSONString(indexInputVOS)); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + + //如果想看每一个指标的分值调用下面的方法 + List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + log.info("计算的结果(List)"+JSON.toJSONString(listTemp)); + HashMap resultMap = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - logger.info("计算的结果:{}", resultMap); + log.info("计算的结果{}", resultMap); return resultMap; } @@ -344,23 +413,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private Map> buildGridCorrelationIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); for (IndexGroupDetailEntity index : indexList) { -// IndexInputVO indexInputVO = new IndexInputVO(); - // 指标code -// indexInputVO.setIndexId(index.getIndexCode()); - //阈值 -// indexInputVO.setThreshold(index.getThreshold()); - //权重 -// indexInputVO.setWeight(index.getWeight()); BigDecimal minValue = null; BigDecimal maxValue = null; if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { //组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值 - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); Map contactMassesAblityMap = this.getContactMassesAblityMap(formDTO); minValue = contactMassesAblityMap.get(StrConstant.MIN); maxValue = contactMassesAblityMap.get(StrConstant.MAX); } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(index.getIndexCode())) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); Map joinIssueAblityMap = this.getJoinIssueAblityMap(formDTO); minValue = joinIssueAblityMap.get(StrConstant.MIN); maxValue = joinIssueAblityMap.get(StrConstant.MAX); @@ -368,15 +430,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); if (StringUtils.isBlank(fieldName)) { - logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); + log.error("index_code:{} not find field_name",index.getIndexCode()); continue; } - logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); +// log.info("index_code2:{} ,field_name:{}",index.getIndexCode(),fieldName); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); } + //有阈值,且最大值>阈值,则最大值赋值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG_STR).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(index.getThreshold()) == NumConstant.ONE) { + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -384,12 +451,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); -// indexInputVO.setScoreCalculator(scoreCalculator); List> sampleValueList = new ArrayList<>(); -// indexInputVO.setIndexValueVOs(sampleValueList); IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), sampleValueList, index.getThreshold(), +// new BigDecimal("-1"),//FOR TEST index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO1); @@ -409,16 +475,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -437,19 +507,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); + String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); + BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); + SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); + value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); //构造样本值对象 SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); - String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); - BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); - SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); - value.getIndexValueVOs().add(contactMassesAblityValue); } }); }); @@ -471,18 +540,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private void calculateGridFuWu(CalculateCommonFormDTO formDTO, List indexList) { //查询总记录数 - int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); + int total = factIndexServiceAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -501,7 +574,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); @@ -509,7 +581,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); } else { - logger.error("index_code:" + key + " not find field_name"); + log.error("index_code:" + key + " not find field_name"); } }); }); @@ -532,25 +604,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 List gridScoreDTOList = gridScoreDao.selectList(formDTO); if(CollectionUtils.isEmpty(gridScoreDTOList)){ - logger.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); + log.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); throw new RenException("客户一级指标分值记录不存在"); } Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List gridScoreEntityList = new ArrayList<>(); for (GridScoreDTO gridScoreDTO : gridScoreDTOList) { - GridScoreEntity gridScoreEntity = new GridScoreEntity(); - gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); - gridScoreEntity.setGridId(gridScoreDTO.getGridId()); + GridScoreEntity gridScoreEntity = ConvertUtils.sourceToTarget(gridScoreDTO, GridScoreEntity.class); gridScoreEntity.setIsTotal(NumConstant.ONE_STR); gridScoreEntity.setIndexCode(indexCode); - gridScoreEntity.setAgencyId(gridScoreDTO.getAgencyId()); - gridScoreEntity.setAllParentIds(gridScoreDTO.getAllParentIds()); - gridScoreEntity.setQuarterId(gridScoreDTO.getQuarterId()); - gridScoreEntity.setYearId(gridScoreDTO.getYearId()); - gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); gridScoreEntity.setScore(BigDecimal.ZERO); if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { - logger.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); + log.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); continue; } for (GridScoreDetailDTO gridScoreDetailDTO : gridScoreDTO.getDetailList()) { @@ -565,14 +630,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } } - public static void main(String[] args) { - BigDecimal totalScore = BigDecimal.ZERO; - for (int i = 1; i < 5; i++) { - totalScore = totalScore.add(new BigDecimal("1.00")); - } - System.out.println(totalScore); - } - /** * @param customerId * @return com.epmet.dto.indexcal.CustomerGridInfoDTO diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java new file mode 100644 index 0000000000..229c3059de --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -0,0 +1,428 @@ +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.druid.util.StringUtils; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao; +import com.epmet.dao.evaluationindex.screen.FactIndexGridScoreDao; +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; +import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; +import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; +import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; +import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:34 上午 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommunityService { + + @Autowired + private FactIndexPartyAblityOrgMonthlyDao factIndexPartyAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityOrgMonthlyDao factIndexGovrnAblityOrgMonthlyDao; + @Autowired + private FactIndexServiceAblityOrgMonthlyDao factIndexServiceAblityOrgMonthlyDao; + @Autowired + private IndexGroupDetailService indexGroupDetailService; + @Autowired + private IndexCodeFieldReService indexCodeFieldReService; + @Autowired + private FactIndexCommunityScoreDao factIndexCommunityScoreDao; + @Autowired + private FactIndexGridScoreDao factIndexGridScoreDao; + + /** + * @param customerId + * @Description 社区名义发文数量计算【党建能力】 + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityPartyCalculate(String customerId, String monthId) { + // 党建能力 + // 根据all_parent_index_code 获取指标明细 + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + //下属所有网格的党建能力平均值 + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(customerId, monthId); + if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { + log.error("查询下属所有网格的党建能力平均值集合为空"); + return; + }else if (subGridPartyAvgScore.size() == NumConstant.ONE){ + sizeOne(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (subGridPartyAvgScore.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexEnd = NumConstant.TEN; + List> partition = ListUtils.partition(subGridPartyAvgScore, indexEnd); + partition.forEach(publish -> { + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 社区名义发文数量 + List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(mapList)) { + log.error("查询社区名义发文数量集合为空"); + return; + } + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + }else if (mapList.size() == NumConstant.ONE){ + sizeOne(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (mapList.size() > NumConstant.ONE) { + List decimalList = mapList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> publishArticleList = ListUtils.partition(mapList, 10); + publishArticleList.forEach(publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区治理能力 + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityGovernAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridGovernAvgScore(customerId, monthId); + if (subGridGovernAvg.size() == NumConstant.ONE) { + sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (subGridGovernAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(subGridGovernAvg, 10); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 治理能力的六个五级指标 + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityGovernAbility)){ + log.error("查询治理能力的六个五级指标集合为空"); + return; + }else if (communityGovernAbility.size() == NumConstant.ONE) { + sizeOne(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (communityGovernAbility.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> governAbilityList = ListUtils.partition(communityGovernAbility, 10); + governAbilityList.forEach(governAbility -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + governAbility.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区服务能力 + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityServiceAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + String indexCode = detail.getIndexCode(); + if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); + if (subGridServiceAvg.size() == NumConstant.ONE) { + sizeOne(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId().toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (subGridServiceAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10); + serviceAvgList.forEach(serviceAvg -> { + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + serviceAvg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } else { + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityActivityCountList)) { + log.error("查询社区活动组织次数集合为空"); + return; + }else if (communityActivityCountList.size() == NumConstant.ONE) { + sizeOne(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (communityActivityCountList.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> communityActivityList = ListUtils.partition(communityActivityCountList, 10); + communityActivityList.forEach(communityActivity -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + communityActivity.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.FU_WU_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区相关计算 + * @author zxc + * @date 2020/9/1 9:21 上午 + */ + public Boolean communityRelate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List
+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Mapper +public interface DeptScoreDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java index 71316cf4f4..2e4a10cde2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexscore/GridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java @@ -15,12 +15,12 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexscore; +package com.epmet.dao.evaluationindex.indexcal; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.GridScoreDTO; -import com.epmet.entity.indexscore.GridScoreEntity; +import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java index f56638a3f6..5db8adb014 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyDao.java @@ -1,4 +1,4 @@ -package com.epmet.dao.indexcoll; /** +package com.epmet.dao.evaluationindex.indexcoll; /** * Copyright 2018 人人开源 https://www.renren.io * * This program is free software: you can redistribute it and/or modify @@ -18,7 +18,7 @@ package com.epmet.dao.indexcoll; /** import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.DeptGovrnAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java index b3002609d1..55d0e5730b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcollect.form.GridGovrnAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -91,8 +91,17 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao. */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgGovrnAbilityFormDTO; -import com.epmet.dto.screen.result.CommunityGovernAbilityResultDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -71,5 +70,5 @@ public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao> selectCommunityGovernAbility(@Param("customerId")String customerId, @Param("monthId")String monthId); + List> selectCommunityGovernAbility(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index cdecd48f51..c23bf91b4c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.GridPartyMemberDataFormDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java index a2fe8dc821..aeaf65e6b5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java @@ -15,14 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; -import com.epmet.dto.indexcollect.FactIndexPartyAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridPartyAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -88,5 +87,21 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao selectPartyAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + /** + * @return java.lang.Integer + * @param formDTO + * @author yinzuomei + * @description 查询(党建能力-网格相关事实表) 这个月共上传记录数 + * @Date 2020/9/2 14:28 + **/ Integer selectCount(CalculateCommonFormDTO formDTO); + + /** + * @return java.lang.String + * @param formDTO + * @author yinzuomei + * @description 场景:客户这个月只上传了一个网格的事实记录 + * @Date 2020/9/2 14:45 + **/ + String selectTheOneGrid(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index 144ecd1d0a..44d3a19638 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -15,16 +15,17 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgPartyAbilityFormDTO; import com.epmet.dto.screen.result.CommunityPublishArticleCountResultDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 党建能力-街道及社区相关事实表 @@ -72,4 +73,13 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao selectPublishArticleCount(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * @Description 查询社区下的发文数 Map + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/26 10:49 上午 + */ + List> selectPublishArticleCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java similarity index 82% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java index 7357c0cedc..ca2489ba6f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; -import com.epmet.dto.indexcollect.FactIndexServiceAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridServiceAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexServiceAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -85,4 +85,22 @@ public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao selectServiceAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * @return int + * @param formDTO + * @author yinzuomei + * @description 查询(服务能力-网格相关事实表)共上传记录数 + * @Date 2020/9/2 14:28 + **/ + int selectCount(CalculateCommonFormDTO formDTO); + + /** + * @return java.lang.String + * @param formDTO + * @author yinzuomei + * @description 场景:客户这个月只上传了一个网格的事实记录 + * @Date 2020/9/2 14:46 + **/ + String selectTheOneGrid(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java index 261fb8b945..b17ad01eea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java @@ -15,17 +15,17 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgServiceAbilityFormDTO; import com.epmet.dto.screen.result.CommunityActivityCountResultDTO; -import com.epmet.dto.screen.result.CommunityPublishArticleCountResultDTO; -import com.epmet.entity.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 服务能力-组织(街道|社区|全区)相关事实表 @@ -73,4 +73,14 @@ public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao selectActivityCount(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * @Description 社区活动组织次数 + * @param customerId + * @param monthId + * @param level + * @author zxc + * @date 2020/9/2 2:09 下午 + */ + List> selectActivityCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java similarity index 91% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java index 607132ea18..189afc8e84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; -import com.epmet.entity.screen.FactIndexCommunityScoreEntity; +import com.epmet.entity.evaluationindex.screen.FactIndexCommunityScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -35,7 +35,7 @@ import java.util.List; public interface FactIndexCommunityScoreDao extends BaseDao { /** - * @Description 党建能力【社区】中间表插入 + * @Description 【社区】中间表插入 * @param lists * @author zxc * @date 2020/8/27 5:05 下午 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java index 223a297db4..96ba8f3c9f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; -import com.epmet.entity.screen.FactIndexGridScoreEntity; +import com.epmet.entity.evaluationindex.screen.FactIndexGridScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java similarity index 68% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java index 25e10869ed..4289caf4db 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java @@ -1,7 +1,7 @@ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexCodeFieldReEntity; +import com.epmet.entity.evaluationindex.screen.IndexCodeFieldReEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java index 7aa2ab9733..780fabd1d2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexDictEntity; +import com.epmet.entity.evaluationindex.screen.IndexDictEntity; import org.apache.ibatis.annotations.Mapper; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java index 5458720940..26cb71f2ec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupEntity; import org.apache.ibatis.annotations.Mapper; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java index 8982bc5f29..b22d6a4a71 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java index 29f074c13f..eb0c0b260a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java index c1e14b531c..0e1b5a2a06 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java index 12271b8e3c..8cd75faff7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CpcBaseDataFormDTO; -import com.epmet.entity.screen.ScreenCpcBaseDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCpcBaseDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index d7851cd754..f0d189f7ea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -15,12 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CustomerAgencyFormDTO; -import com.epmet.dto.screencoll.form.CustomerGridFormDTO; -import com.epmet.entity.screen.ScreenCustomerAgencyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java index 53f37049a3..00baee166f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CustomerDeptFormDTO; -import com.epmet.entity.screen.ScreenCustomerDeptEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java index b826b7cbcc..4254712cbf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.screencoll.form.CustomerGridFormDTO; -import com.epmet.entity.screen.ScreenCustomerGridEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java index 1a9b991bac..21eaa80280 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.DifficultyDataFormDTO; -import com.epmet.entity.screen.ScreenDifficultyDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java index ec80809c55..14c0153f62 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.EventDataFormDTO; -import com.epmet.entity.screen.ScreenEventDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenEventDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java similarity index 91% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java index 42ca86859e..835b1f112d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.ScreenEventImgDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenEventImgDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java index ea3d67aa68..3dca5cc281 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.GovernRankDataFormDTO; -import com.epmet.entity.screen.ScreenGovernRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenGovernRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index e97406febf..a38ff1cbe6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO; -import com.epmet.entity.screen.ScreenIndexDataMonthlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenIndexDataMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java index 4ca64f6944..bb2a5eeb6e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.IndexDataYearlyFormDTO; -import com.epmet.entity.screen.ScreenIndexDataYearlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenIndexDataYearlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java index 4eabfd508a..00b4599fe4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.OrgRankDataFormDTO; -import com.epmet.entity.screen.ScreenOrgRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenOrgRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java index 3cae4a160d..3f2de14703 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyBranchDataFormDTO; -import com.epmet.entity.screen.ScreenPartyBranchDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyBranchDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java index 276b08e356..931c05c6bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyLinkMassesDataFormDTO; -import com.epmet.entity.screen.ScreenPartyLinkMassesDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyLinkMassesDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java index 9e43669618..e1f527f47d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyUserRankDataFormDTO; -import com.epmet.entity.screen.ScreenPartyUserRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java index 202fc4aa59..b50d74b1a9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PioneerDataFormDTO; -import com.epmet.entity.screen.ScreenPioneerDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java index a4fdc9f221..5bc9ea4130 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PublicPartiTotalDataFormDTO; -import com.epmet.entity.screen.ScreenPublicPartiTotalDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPublicPartiTotalDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java index 69422c07c4..a620008b22 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.ScreenUserJoinEntity; +import com.epmet.entity.evaluationindex.screen.ScreenUserJoinEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java index e0712dee50..5595259af6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.UserTotalDataFormDTO; -import com.epmet.entity.screen.ScreenUserTotalDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java new file mode 100644 index 0000000000..879018ac99 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java @@ -0,0 +1,90 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.evaluationindex.indexcal; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_agency_score") +public class AgencyScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织id(eg:社区或者街道id) + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentAgencyId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan + */ + private String indexCode; + + /** + * 数据类型 district :全区;street:街道 + */ + private String dataType; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java index cca1b90ff2..0b21c5de92 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexscore; +package com.epmet.entity.evaluationindex.indexcal; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java new file mode 100644 index 0000000000..8517c59ff1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java @@ -0,0 +1,85 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.evaluationindex.indexcal; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_dept_score") +public class DeptScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 部门id + */ + private String deptId; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 治理能力:zhilinengli; + */ + private String indexCode; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java index 9b1bdf2f73..781dca54bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexscore; +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; -import java.util.Date; /** * 网格相关分值 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java index 24827756fa..47501f13f4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-部门相关数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java index c1c6553ef5..7b0c61a9fd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-网格相关事实表 @@ -82,7 +80,7 @@ public class FactIndexGovrnAblityGridMonthlyEntity extends BaseEpmetEntity { /** * 网格议题转项目率 */ - private BigDecimal avgShiftProjectRatio; + private BigDecimal issueToProjectRatio; /** * 网格总项目数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java index 94eec97d6f..a104561749 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-街道及社区相关数据 @@ -70,7 +68,7 @@ public class FactIndexGovrnAblityOrgMonthlyEntity extends BaseEpmetEntity { private String yearId; /** - * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + * 数据类型 district:全区;street:街道;community:社区;grid:网格 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java index 689c396b2a..550a5ce8a1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 党建能力-党员相关的事实表 @@ -50,7 +48,7 @@ public class FactIndexPartyAblityCpcMonthlyEntity extends BaseEpmetEntity { private String agencyId; /** - * 上级组织Id + * agency_id的上级组织Id */ private String parentId; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java index 208106e87a..b38d4c4d7a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 党建能力-网格相关事实表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java index 1bf023f055..80bcce0819 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 党建能力-街道及社区相关事实表 * @@ -74,7 +71,7 @@ public class FactIndexPartyAblityOrgMonthlyEntity extends BaseEpmetEntity { private Integer publishArticleCount; /** - * 数据类型 allRegion:全区;community:社区;street:街道 + * 数据类型 district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java index d4c6aa6ab6..fedcaf1637 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 服务能力-网格相关事实表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java index 8abeb1c172..a93c7fbae4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 服务能力-组织(街道|社区|全区)相关事实表 * @@ -74,7 +71,7 @@ public class FactIndexServiceAblityOrgMonthlyEntity extends BaseEpmetEntity { private Integer activityCount; /** - * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + * 数据类型 district:全区;street:街道;community:社区;grid:网格 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java index b43e51ad7c..40a112d6d8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 社区相关-党建能力【五级权重】分数表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java index 01b0ff363f..d99cd7b506 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 社区相关分数表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java index 99bc4d0ed1..05ab819f20 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 网格相关分值 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java index 7821fbe41b..042508eae6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java @@ -1,4 +1,4 @@ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java index 299a1dca5c..e0932daeef 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java index ba9d1a3b09..8a1b94fb3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java index bedab6e7f7..0d06fe6955 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java index dcd8c63648..dfe57f7d8d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java index 6a6408f7a1..e22f7e6f2f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java index e649e5e89f..fa70f90897 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层党建-党员基本情况 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java index 96b2e23dfe..e06907ca84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java @@ -14,16 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 组织机构信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java index f020e44cd8..6fdb38f4b8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 部门信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java index 62dddc6960..19fdd132be 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 网格(党支部)信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java index 9a4d3af36b..35f4ca3ee4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层治理-难点堵点(耗时最长|设计部门最多|处理次数) * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java similarity index 98% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java index 0242ab8ce2..ea8b52cd3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java @@ -15,10 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java index fb0e81290b..8609b4f1b9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 中央区-事件数据图片数据 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java index d280785a6c..f60c612d9e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 基层治理-治理能力排行数据(按月统计) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java index fbeb83ba9a..e8d16e858d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 指数-指数数据(每月数值) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java index 259947010d..3c6b62b0e4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 指数-指数数据(按年统计) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java index abbdbb7d20..1c1a893327 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 党建引领-组织先进排行榜 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java index cb870d2de7..34ecdac955 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java @@ -14,16 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层党建-建设情况数据(支部,联建,志愿服务)按月 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java index c663fc770b..0a8d768127 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 党建引领-党员联系群众数据 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java index c542da7085..4d70bf29ff 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 党建引领|基层治理-市民(党员)积分排行榜 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java index b53561b229..a51b8b6449 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 党建引领-先锋模范数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java index 56905509ad..3f38146cc6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 公众参与-各类(话题|议题|项目|注册人数|参与人数)总数 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java index 8a2009d9ca..75668a1215 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 基层治理-公众参与 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java index bc50eaea04..c41ef72cc3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 中央区-各类(用户|党员|党群|话题|议题|项目)总数 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java index 620175e5c5..88e759af17 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -25,6 +25,9 @@ public enum IndexCodeEnum { LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz","组织内党员的联系群众能力考评分(平均值)",5), ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydsyysnlkpfpjz","组织内党员的参与议事能力考评分(平均值)",5), + XIA_SHU_SUO_YOU_WGDDJNLPJZ("xiashusuoyouwgddjnlpjz","下属所有网格的党建能力(平均值)",5), + SHE_QU_XIA_SHU_SYWGZLNLHZPJZ("shequxiashusywgzlnlhzpjz","社区下属所有网格治理能力汇总(平均值)",5), + SHE_QU_XIA_JI_SYWGFWNLDFPJZ("shequxiajisywgfwnldfpjz","社区下级所有网格服务能力得分(平均值) ",5), ; private String code; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index 9267d562a8..eef2856684 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -5,12 +5,12 @@ import com.alibaba.excel.event.AnalysisEventListener; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.UniqueIdGenerator; -import com.epmet.entity.screen.IndexDictEntity; -import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; -import com.epmet.entity.screen.IndexGroupTemplateEntity; -import com.epmet.service.screen.IndexDictService; -import com.epmet.service.screen.IndexGroupDetailTemplateService; -import com.epmet.service.screen.IndexGroupTemplateService; +import com.epmet.entity.evaluationindex.screen.IndexDictEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity; +import com.epmet.service.evaluationindex.screen.IndexDictService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailTemplateService; +import com.epmet.service.evaluationindex.screen.IndexGroupTemplateService; import com.epmet.util.Pinyin4jUtil; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -130,7 +130,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { String level4Index = index.getLevel4Index(); indexDictEntity = indexDicMap.get(level4Index); - IndexGroupTemplateEntity group2 = indexGroupMap.get(index.getLevel1Index() + level4Index); + String level4IndexDetailKey = index.getLevel1Index() + index.getLevel2Index() + level4Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(level4IndexDetailKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); @@ -138,7 +139,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setParentIndexGroupId(group1.getId()); group2.setId(UniqueIdGenerator.generate()); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); - indexGroupMap.put(index.getLevel1Index() + level4Index, group2); + indexGroupMap.put(level4IndexDetailKey, group2); //构建 分组明细 templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + level4Index); if (templateEntity == null) { @@ -154,9 +155,10 @@ public class IndexExcelDataListener extends AnalysisEventListener { } indexDictEntity = indexDicMap.get(index.getLevel5Index()); + String level5IndexDetailKey = index.getLevel1Index() + index.getLevel2Index() + index.getLevel5Index(); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); + templateEntity = indexGroupDetailMap.get(level5IndexDetailKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -165,7 +167,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); - indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); + indexGroupDetailMap.put(level5IndexDetailKey, templateEntity); } } else { //todo 测试完去掉 @@ -183,8 +185,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); String level2Index = index.getLevel2Index(); indexDictEntity = indexDicMap.get(level2Index); - String groupMapKey = index.getLevel1Index() + level2Index; - IndexGroupTemplateEntity group2 = indexGroupMap.get(groupMapKey); + String level2IndexGroupKey = index.getLevel1Index() + level2Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(level2IndexGroupKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); @@ -193,9 +195,9 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setId(UniqueIdGenerator.generate()); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); - indexGroupMap.put(groupMapKey, group2); + indexGroupMap.put(level2IndexGroupKey, group2); //构建 分组明细 - templateEntity = indexGroupDetailMap.get(level2Index); + templateEntity = indexGroupDetailMap.get(level2IndexGroupKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -204,13 +206,14 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); - indexGroupDetailMap.put(groupMapKey, templateEntity); + indexGroupDetailMap.put(level2IndexGroupKey, templateEntity); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); + String level5IndexGroupKey = index.getLevel1Index() + index.getLevel2Index() + index.getLevel5Index(); + templateEntity = indexGroupDetailMap.get(level5IndexGroupKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -219,7 +222,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); - indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); + indexGroupDetailMap.put(level5IndexGroupKey, templateEntity); } } //} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java index 2863952420..8a99d62890 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java @@ -51,4 +51,12 @@ public class IndexCodeFieldReRedis { hashOperations.putAll(RedisKeys.getIndexCodeFieldReKey(), records); redisTemplate.expire(RedisKeys.getIndexCodeFieldReKey(), 1, TimeUnit.DAYS); } + + /** + * desc:删除指标字段关系缓存 + * @return + */ + public Boolean deleteIndexCodeFromRedis() { + return redisTemplate.delete(RedisKeys.getIndexCodeFieldReKey()); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java new file mode 100644 index 0000000000..0805622937 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; + +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface AgencyScoreService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-09-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-09-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return AgencyScoreDTO + * @author generator + * @date 2020-09-02 + */ + AgencyScoreDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void save(AgencyScoreDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void update(AgencyScoreDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-09-02 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java index d65f6d43db..3cd66eccf5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.indexcal.CalculateCommonFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java new file mode 100644 index 0000000000..afb6bc40bc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java @@ -0,0 +1,39 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface DeptScoreService extends BaseService { + /** + * @return java.lang.Boolean + * @param formDTO + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java index 6648205d5c..14d2ac604c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java @@ -1,6 +1,5 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; -import com.epmet.commons.tools.utils.Result; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java new file mode 100644 index 0000000000..09d344dd47 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java @@ -0,0 +1,17 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:33 上午 + */ +public interface IndexCalculateCommunityService { + + /** + * @Description 计算社区相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/1 4:12 下午 + */ + Boolean calCommunityAll(String customerId, String monthId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java similarity index 73% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java index 70c49c77fe..a1ab0ad1bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.screen.form.IndexCalculateForm; @@ -10,7 +10,7 @@ import com.epmet.dto.screen.form.IndexCalculateForm; */ public interface IndexCalculateService { /** - * desc:计算党员相关指标 + * desc:按照客户计算所有指标(按照月份) * @param formDTO * @return */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java new file mode 100644 index 0000000000..c27b6db508 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java @@ -0,0 +1,18 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/9/2 3:11 下午 + */ +public interface IndexCalculateStreetService { + + /** + * @Description 计算街道相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/2 3:12 下午 + */ + Boolean calStreetAll(String customerId, String monthId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java index e54f182903..d2804d1dec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java new file mode 100644 index 0000000000..17f56e6895 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; +import com.epmet.service.evaluationindex.indexcal.AgencyScoreService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class AgencyScoreServiceImpl extends BaseServiceImpl implements AgencyScoreService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, AgencyScoreDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, AgencyScoreDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public AgencyScoreDTO get(String id) { + AgencyScoreEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, AgencyScoreDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index c2d8a924cb..7876c2158e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,20 +1,23 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.screen.IndexCodeFieldReDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dao.evaluationindex.screen.IndexCodeFieldReDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.entity.indexscore.CpcScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.CpcIndexCalculateService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; +import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; import com.epmet.support.normalizing.BigDecimalScoreCalculator; import com.epmet.support.normalizing.Correlation; import com.epmet.support.normalizing.ScoreCalculator; @@ -35,6 +38,7 @@ import java.util.stream.Collectors; @Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; @@ -83,38 +87,35 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { if (totalEntity == null) { totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); totalEntity.setIsTotal(NumConstant.ONE_STR); - totalEntity.setIndexCode(indexGroupDetailEntity.getIndexCode()); + totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); totalEntity.setScore(new BigDecimal(0)); cpcScoreTotalMap.put(userId, totalEntity); } - //todo 自建群活跃度——议题转项目率 有阈值 >60%按60%算 + //自建群活跃度——议题转项目率 有阈值 >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)); } }); - insertBatch(cpcScoreTotalMap.values().stream().collect(Collectors.toList())); + deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(),cpcScoreTotalMap.values().stream().collect(Collectors.toList())); } - private void insertBatch(Collection values) { + private void deleteAndInsertBatch(String customerId, String monthId, String indexCode, Collection values) { + cpcScoreDao.deleteByMonthId(customerId, monthId, indexCode); cpcScoreDao.insertBatch(values); } private void calculatePartScore(CalculateCommonFormDTO formDTO) { - Map indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); - if (CollectionUtils.isEmpty(indexCodeFieldReList)) { - log.error("cpcIndexCalculate have any indexcodefieldre"); - return; - } //计算最大最小值 Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.error("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); - return; + throw new RenException("指标原始数据记录不存在"); } //指标集合 Map> groupIndexDetailsMap = getIndexDetailMap(formDTO); if (groupIndexDetailsMap == null) { + log.error("calculatePartScore"); return; } @@ -152,7 +153,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { IndexInputVO value = entry.getValue(); String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); if (StringUtils.isBlank(fieldName)) { - log.error("cpcIndexCalculate fieldName error"); + log.error("calculateScore indexCode:{} get fieldName return blank", indexCode); continue; } @@ -179,11 +180,15 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { value.getIndexValueVOs().add(currentUserIndexValue); } } - log.warn("计算的参数:{}", indexMap); + log.info("计算的参数:{}", JSON.toJSONString(indexMap)); HashMap result = calculateScore(indexMap); - log.warn("计算的结果:{}", result); + log.info("计算的结果:{}", result); //处理结果 + if (CollectionUtils.isEmpty(result)){ + log.error("calculateScore calculateScore return empty"); + return; + } saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); } @@ -197,14 +202,14 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { */ @Transactional(rollbackFor = Exception.class) public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); + List list = new ArrayList<>(); result.forEach((userId, score) -> { CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); cpcScoreEntity.setScore(score); list.add(cpcScoreEntity); }); - this.insertBatch(list); + this.deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),parentIndexCode,list); } @@ -226,13 +231,20 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); + if (StringUtils.isBlank(fieldName)) { + continue; + } //最小值key String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); //最大值key String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); - minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); - + minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); + //如果最大值超过阈值 则最大值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(new BigDecimal(NumConstant.ONE_NEG)) == NumConstant.ONE){ + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -240,7 +252,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(),new ArrayList<>(),index.getThreshold(),index.getWeight(),scoreCalculator); + IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO); } return map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java new file mode 100644 index 0000000000..d999757956 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.DeptScoreService; +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.util.List; + + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Slf4j +@Service +public class DeptScoreServiceImpl extends BaseServiceImpl implements DeptScoreService { + @Autowired + private IndexGroupDetailService getDetailListByParentCode; + @Autowired + private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; + + /** + * @param formDTO + * @return java.lang.Boolean + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + @Override + public Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO) { + //获取指标权重 + List parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.QU_ZHI_BU_MEN.getCode(), + IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(parentIndexDetails)) { + log.warn("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【区直部门:治理能力】指标权重信息不存在"); + } + log.info(JSON.toJSONString(parentIndexDetails)); + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java similarity index 75% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 7fa8281f15..306c3c7713 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,29 +1,38 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.indexscore.GridScoreDao; -import com.epmet.dao.screen.ScreenCustomerGridDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.*; -import com.epmet.entity.indexscore.GridScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.GridCorreLationService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; -import com.epmet.support.normalizing.*; -import com.epmet.support.normalizing.batch.*; +import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.IndexOutputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -40,9 +49,10 @@ import java.util.stream.Collectors; * @author yinzuomei@elink-cn.com * @date 2020/8/26 10:35 */ +@Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class GridCorreLationServiceImpl implements GridCorreLationService { - private Logger logger = LogManager.getLogger(GridCorreLationServiceImpl.class); @Autowired private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; @Autowired @@ -76,36 +86,33 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(dangJianNengLiList)) { - logger.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:党建能力】指标权重信息不存在"); } calculateGridDangJian(formDTO, dangJianNengLiList); - //2、计算网格相关-治理能力 List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(zhiLiNengLiList)) { - logger.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); } calculateGridZhiLi(formDTO, zhiLiNengLiList); - //3、计算网格相关-服务能力 List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(fuWuNengLiList)) { - logger.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); } calculateGridFuWu(formDTO, fuWuNengLiList); - //4、计算网格相关总分 List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); if (CollectionUtils.isEmpty(wgxgList)) { - logger.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关】指标权重信息不存在"); } calculateGridTotal(formDTO, wgxgList, IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); @@ -127,16 +134,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-党建能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + } else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -155,21 +166,21 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { - //对应的数值 - String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); - //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { + log.info("index_code :{}",key); + if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { //组织内党员的联系群众能力考评分(平均值) - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); //网格内党员的联系群众能力考评分(平均值) String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO, gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); } }); }); @@ -180,6 +191,31 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), NumConstant.ZERO_STR); } + /** + * @param formDTO + * @param indexCode + * @return void + * @author yinzuomei + * @description 只有一条事实记录时,分值默认赋50 + * @Date 2020/9/2 14:35 + **/ + private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) { + List> resultMapList = new ArrayList<>(); + HashMap resultMap = new HashMap<>(); + String gridId =null; + if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexPartyAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.ZHI_LI_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexGovrnAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.FU_WU_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexServiceAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } + resultMap.put(gridId, new BigDecimal(NumConstant.FIFTY_STR)); + resultMapList.add(resultMap); + // 保存中间表 + saveGridCorreLationResult(formDTO, resultMapList, indexCode, NumConstant.ZERO_STR); + } + /** * @param calculateCommonFormDTO * @return java.util.Map @@ -199,6 +235,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + //FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("24.35")); + map.put(StrConstant.MAX, new BigDecimal("46.13"));*/ return map; } @@ -215,6 +254,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("24.43"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("46.13"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("24.35"); + }*/ return result; } @@ -231,6 +279,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("29.40"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("18.30"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("9.15"); + }*/ return result; } @@ -253,6 +310,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + // FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("9.15")); + map.put(StrConstant.MAX, new BigDecimal("29.4"));*/ return map; } @@ -275,7 +335,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { String yearId = DateUtils.getYearId(formDTO.getMonthId()); for (HashMap resultMap : resultMapList) { resultMap.forEach((gridId, partyAblityScore) -> { - logger.info("网格id:" + gridId + ";分值:" + partyAblityScore); + log.info("网格id:" + gridId + ";index_Code:"+indexCode+";分值:" + partyAblityScore); GridScoreEntity gridScoreEntity = new GridScoreEntity(); gridScoreEntity.setCustomerId(formDTO.getCustomerId()); gridScoreEntity.setGridId(gridId); @@ -283,8 +343,12 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setIndexCode(indexCode); ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(formDTO.getCustomerId(), gridId); if (null != screenCustomerGridDTO) { - gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); - gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + if(StringUtils.isNotBlank(screenCustomerGridDTO.getParentAgencyId())){ + gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); + } + if(StringUtils.isNotBlank(screenCustomerGridDTO.getAllParentIds())){ + gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + } } gridScoreEntity.setQuarterId(quarterId); gridScoreEntity.setYearId(yearId); @@ -309,10 +373,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); - logger.info("计算的参数:{}", indexInputVOS); + log.info("计算的参数"+JSON.toJSONString(indexInputVOS)); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + + //如果想看每一个指标的分值调用下面的方法 + List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + log.info("计算的结果(List)"+JSON.toJSONString(listTemp)); + HashMap resultMap = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - logger.info("计算的结果:{}", resultMap); + log.info("计算的结果{}", resultMap); return resultMap; } @@ -344,23 +413,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private Map> buildGridCorrelationIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); for (IndexGroupDetailEntity index : indexList) { -// IndexInputVO indexInputVO = new IndexInputVO(); - // 指标code -// indexInputVO.setIndexId(index.getIndexCode()); - //阈值 -// indexInputVO.setThreshold(index.getThreshold()); - //权重 -// indexInputVO.setWeight(index.getWeight()); BigDecimal minValue = null; BigDecimal maxValue = null; if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { //组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值 - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); Map contactMassesAblityMap = this.getContactMassesAblityMap(formDTO); minValue = contactMassesAblityMap.get(StrConstant.MIN); maxValue = contactMassesAblityMap.get(StrConstant.MAX); } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(index.getIndexCode())) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); Map joinIssueAblityMap = this.getJoinIssueAblityMap(formDTO); minValue = joinIssueAblityMap.get(StrConstant.MIN); maxValue = joinIssueAblityMap.get(StrConstant.MAX); @@ -368,15 +430,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); if (StringUtils.isBlank(fieldName)) { - logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); + log.error("index_code:{} not find field_name",index.getIndexCode()); continue; } - logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); +// log.info("index_code2:{} ,field_name:{}",index.getIndexCode(),fieldName); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); } + //有阈值,且最大值>阈值,则最大值赋值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG_STR).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(index.getThreshold()) == NumConstant.ONE) { + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -384,12 +451,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); -// indexInputVO.setScoreCalculator(scoreCalculator); List> sampleValueList = new ArrayList<>(); -// indexInputVO.setIndexValueVOs(sampleValueList); IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), sampleValueList, index.getThreshold(), +// new BigDecimal("-1"),//FOR TEST index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO1); @@ -409,16 +475,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -437,19 +507,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); + String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); + BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); + SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); + value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); //构造样本值对象 SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); - String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); - BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); - SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); - value.getIndexValueVOs().add(contactMassesAblityValue); } }); }); @@ -471,18 +540,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private void calculateGridFuWu(CalculateCommonFormDTO formDTO, List indexList) { //查询总记录数 - int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); + int total = factIndexServiceAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -501,7 +574,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); @@ -509,7 +581,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); } else { - logger.error("index_code:" + key + " not find field_name"); + log.error("index_code:" + key + " not find field_name"); } }); }); @@ -532,25 +604,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 List gridScoreDTOList = gridScoreDao.selectList(formDTO); if(CollectionUtils.isEmpty(gridScoreDTOList)){ - logger.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); + log.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); throw new RenException("客户一级指标分值记录不存在"); } Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List gridScoreEntityList = new ArrayList<>(); for (GridScoreDTO gridScoreDTO : gridScoreDTOList) { - GridScoreEntity gridScoreEntity = new GridScoreEntity(); - gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); - gridScoreEntity.setGridId(gridScoreDTO.getGridId()); + GridScoreEntity gridScoreEntity = ConvertUtils.sourceToTarget(gridScoreDTO, GridScoreEntity.class); gridScoreEntity.setIsTotal(NumConstant.ONE_STR); gridScoreEntity.setIndexCode(indexCode); - gridScoreEntity.setAgencyId(gridScoreDTO.getAgencyId()); - gridScoreEntity.setAllParentIds(gridScoreDTO.getAllParentIds()); - gridScoreEntity.setQuarterId(gridScoreDTO.getQuarterId()); - gridScoreEntity.setYearId(gridScoreDTO.getYearId()); - gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); gridScoreEntity.setScore(BigDecimal.ZERO); if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { - logger.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); + log.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); continue; } for (GridScoreDetailDTO gridScoreDetailDTO : gridScoreDTO.getDetailList()) { @@ -565,14 +630,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } } - public static void main(String[] args) { - BigDecimal totalScore = BigDecimal.ZERO; - for (int i = 1; i < 5; i++) { - totalScore = totalScore.add(new BigDecimal("1.00")); - } - System.out.println(totalScore); - } - /** * @param customerId * @return com.epmet.dto.indexcal.CustomerGridInfoDTO diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java new file mode 100644 index 0000000000..229c3059de --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -0,0 +1,428 @@ +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.druid.util.StringUtils; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao; +import com.epmet.dao.evaluationindex.screen.FactIndexGridScoreDao; +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; +import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; +import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; +import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; +import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:34 上午 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommunityService { + + @Autowired + private FactIndexPartyAblityOrgMonthlyDao factIndexPartyAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityOrgMonthlyDao factIndexGovrnAblityOrgMonthlyDao; + @Autowired + private FactIndexServiceAblityOrgMonthlyDao factIndexServiceAblityOrgMonthlyDao; + @Autowired + private IndexGroupDetailService indexGroupDetailService; + @Autowired + private IndexCodeFieldReService indexCodeFieldReService; + @Autowired + private FactIndexCommunityScoreDao factIndexCommunityScoreDao; + @Autowired + private FactIndexGridScoreDao factIndexGridScoreDao; + + /** + * @param customerId + * @Description 社区名义发文数量计算【党建能力】 + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityPartyCalculate(String customerId, String monthId) { + // 党建能力 + // 根据all_parent_index_code 获取指标明细 + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + //下属所有网格的党建能力平均值 + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(customerId, monthId); + if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { + log.error("查询下属所有网格的党建能力平均值集合为空"); + return; + }else if (subGridPartyAvgScore.size() == NumConstant.ONE){ + sizeOne(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (subGridPartyAvgScore.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexEnd = NumConstant.TEN; + List> partition = ListUtils.partition(subGridPartyAvgScore, indexEnd); + partition.forEach(publish -> { + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 社区名义发文数量 + List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(mapList)) { + log.error("查询社区名义发文数量集合为空"); + return; + } + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + }else if (mapList.size() == NumConstant.ONE){ + sizeOne(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (mapList.size() > NumConstant.ONE) { + List decimalList = mapList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> publishArticleList = ListUtils.partition(mapList, 10); + publishArticleList.forEach(publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区治理能力 + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityGovernAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridGovernAvgScore(customerId, monthId); + if (subGridGovernAvg.size() == NumConstant.ONE) { + sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (subGridGovernAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(subGridGovernAvg, 10); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 治理能力的六个五级指标 + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityGovernAbility)){ + log.error("查询治理能力的六个五级指标集合为空"); + return; + }else if (communityGovernAbility.size() == NumConstant.ONE) { + sizeOne(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (communityGovernAbility.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> governAbilityList = ListUtils.partition(communityGovernAbility, 10); + governAbilityList.forEach(governAbility -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + governAbility.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区服务能力 + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityServiceAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + String indexCode = detail.getIndexCode(); + if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); + if (subGridServiceAvg.size() == NumConstant.ONE) { + sizeOne(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId().toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (subGridServiceAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10); + serviceAvgList.forEach(serviceAvg -> { + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + serviceAvg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } else { + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityActivityCountList)) { + log.error("查询社区活动组织次数集合为空"); + return; + }else if (communityActivityCountList.size() == NumConstant.ONE) { + sizeOne(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (communityActivityCountList.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> communityActivityList = ListUtils.partition(communityActivityCountList, 10); + communityActivityList.forEach(communityActivity -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + communityActivity.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.FU_WU_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区相关计算 + * @author zxc + * @date 2020/9/1 9:21 上午 + */ + public Boolean communityRelate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List
* This program is free software: you can redistribute it and/or modify @@ -18,7 +18,7 @@ package com.epmet.dao.indexcoll; /** import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.DeptGovrnAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java index b3002609d1..55d0e5730b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.indexcollect.form.GridGovrnAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -91,8 +91,17 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao. */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgGovrnAbilityFormDTO; -import com.epmet.dto.screen.result.CommunityGovernAbilityResultDTO; -import com.epmet.entity.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -71,5 +70,5 @@ public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao> selectCommunityGovernAbility(@Param("customerId")String customerId, @Param("monthId")String monthId); + List> selectCommunityGovernAbility(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java index cdecd48f51..c23bf91b4c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.GridPartyMemberDataFormDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java index a2fe8dc821..aeaf65e6b5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyDao.java @@ -15,14 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; -import com.epmet.dto.indexcollect.FactIndexPartyAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridPartyAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -88,5 +87,21 @@ public interface FactIndexPartyAblityGridMonthlyDao extends BaseDao selectPartyAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + /** + * @return java.lang.Integer + * @param formDTO + * @author yinzuomei + * @description 查询(党建能力-网格相关事实表) 这个月共上传记录数 + * @Date 2020/9/2 14:28 + **/ Integer selectCount(CalculateCommonFormDTO formDTO); + + /** + * @return java.lang.String + * @param formDTO + * @author yinzuomei + * @description 场景:客户这个月只上传了一个网格的事实记录 + * @Date 2020/9/2 14:45 + **/ + String selectTheOneGrid(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index 144ecd1d0a..44d3a19638 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -15,16 +15,17 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgPartyAbilityFormDTO; import com.epmet.dto.screen.result.CommunityPublishArticleCountResultDTO; -import com.epmet.entity.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 党建能力-街道及社区相关事实表 @@ -72,4 +73,13 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao selectPublishArticleCount(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * @Description 查询社区下的发文数 Map + * @param customerId + * @param monthId + * @author zxc + * @date 2020/8/26 10:49 上午 + */ + List> selectPublishArticleCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java similarity index 82% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java index 7357c0cedc..ca2489ba6f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityGridMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; -import com.epmet.dto.indexcollect.FactIndexServiceAblityGridMonthlyDTO; import com.epmet.dto.indexcollect.form.GridServiceAbilityFormDTO; -import com.epmet.entity.indexcoll.FactIndexServiceAblityGridMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -85,4 +85,22 @@ public interface FactIndexServiceAblityGridMonthlyDao extends BaseDao selectServiceAblityGridMinAndMax(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * @return int + * @param formDTO + * @author yinzuomei + * @description 查询(服务能力-网格相关事实表)共上传记录数 + * @Date 2020/9/2 14:28 + **/ + int selectCount(CalculateCommonFormDTO formDTO); + + /** + * @return java.lang.String + * @param formDTO + * @author yinzuomei + * @description 场景:客户这个月只上传了一个网格的事实记录 + * @Date 2020/9/2 14:46 + **/ + String selectTheOneGrid(CalculateCommonFormDTO formDTO); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java index 261fb8b945..b17ad01eea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java @@ -15,17 +15,17 @@ * along with this program. If not, see . */ -package com.epmet.dao.indexcoll; +package com.epmet.dao.evaluationindex.indexcoll; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.indexcollect.form.OrgServiceAbilityFormDTO; import com.epmet.dto.screen.result.CommunityActivityCountResultDTO; -import com.epmet.dto.screen.result.CommunityPublishArticleCountResultDTO; -import com.epmet.entity.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; +import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 服务能力-组织(街道|社区|全区)相关事实表 @@ -73,4 +73,14 @@ public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao selectActivityCount(@Param("customerId")String customerId, @Param("monthId")String monthId); + + /** + * @Description 社区活动组织次数 + * @param customerId + * @param monthId + * @param level + * @author zxc + * @date 2020/9/2 2:09 下午 + */ + List> selectActivityCountMap(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("level")String level); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java similarity index 91% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java index 607132ea18..189afc8e84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexCommunityScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screen.FactIndexCommunityScoreDTO; -import com.epmet.entity.screen.FactIndexCommunityScoreEntity; +import com.epmet.entity.evaluationindex.screen.FactIndexCommunityScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -35,7 +35,7 @@ import java.util.List; public interface FactIndexCommunityScoreDao extends BaseDao { /** - * @Description 党建能力【社区】中间表插入 + * @Description 【社区】中间表插入 * @param lists * @author zxc * @date 2020/8/27 5:05 下午 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java index 223a297db4..96ba8f3c9f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/FactIndexGridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; -import com.epmet.entity.screen.FactIndexGridScoreEntity; +import com.epmet.entity.evaluationindex.screen.FactIndexGridScoreEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java similarity index 68% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java index 25e10869ed..4289caf4db 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexCodeFieldReDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexCodeFieldReDao.java @@ -1,7 +1,7 @@ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexCodeFieldReEntity; +import com.epmet.entity.evaluationindex.screen.IndexCodeFieldReEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java index 7aa2ab9733..780fabd1d2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexDictDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexDictDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexDictEntity; +import com.epmet.entity.evaluationindex.screen.IndexDictEntity; import org.apache.ibatis.annotations.Mapper; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java index 5458720940..26cb71f2ec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupEntity; import org.apache.ibatis.annotations.Mapper; /** diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java index 8982bc5f29..b22d6a4a71 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java index 29f074c13f..eb0c0b260a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupDetailTemplateDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupDetailTemplateDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java similarity index 90% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java index c1e14b531c..0e1b5a2a06 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/IndexGroupTemplateDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/IndexGroupTemplateDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.IndexGroupTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java index 12271b8e3c..8cd75faff7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCpcBaseDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCpcBaseDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CpcBaseDataFormDTO; -import com.epmet.entity.screen.ScreenCpcBaseDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCpcBaseDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java index d7851cd754..f0d189f7ea 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerAgencyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerAgencyDao.java @@ -15,12 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CustomerAgencyFormDTO; -import com.epmet.dto.screencoll.form.CustomerGridFormDTO; -import com.epmet.entity.screen.ScreenCustomerAgencyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java index 53f37049a3..00baee166f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerDeptDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerDeptDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.CustomerDeptFormDTO; -import com.epmet.entity.screen.ScreenCustomerDeptEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerDeptEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java index b826b7cbcc..4254712cbf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; import com.epmet.dto.screencoll.form.CustomerGridFormDTO; -import com.epmet.entity.screen.ScreenCustomerGridEntity; +import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java index 1a9b991bac..21eaa80280 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenDifficultyDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenDifficultyDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.DifficultyDataFormDTO; -import com.epmet.entity.screen.ScreenDifficultyDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenDifficultyDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java index ec80809c55..14c0153f62 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.EventDataFormDTO; -import com.epmet.entity.screen.ScreenEventDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenEventDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java similarity index 91% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java index 42ca86859e..835b1f112d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenEventImgDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenEventImgDataDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.ScreenEventImgDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenEventImgDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java index ea3d67aa68..3dca5cc281 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenGovernRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenGovernRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.GovernRankDataFormDTO; -import com.epmet.entity.screen.ScreenGovernRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenGovernRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java index e97406febf..a38ff1cbe6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO; -import com.epmet.entity.screen.ScreenIndexDataMonthlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenIndexDataMonthlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java index 4ca64f6944..bb2a5eeb6e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenIndexDataYearlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.IndexDataYearlyFormDTO; -import com.epmet.entity.screen.ScreenIndexDataYearlyEntity; +import com.epmet.entity.evaluationindex.screen.ScreenIndexDataYearlyEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java index 4eabfd508a..00b4599fe4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenOrgRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenOrgRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.OrgRankDataFormDTO; -import com.epmet.entity.screen.ScreenOrgRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenOrgRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java index 3cae4a160d..3f2de14703 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyBranchDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyBranchDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyBranchDataFormDTO; -import com.epmet.entity.screen.ScreenPartyBranchDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyBranchDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java index 276b08e356..931c05c6bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyLinkMassesDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyLinkMassesDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyLinkMassesDataFormDTO; -import com.epmet.entity.screen.ScreenPartyLinkMassesDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyLinkMassesDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java index 9e43669618..e1f527f47d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPartyUserRankDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPartyUserRankDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PartyUserRankDataFormDTO; -import com.epmet.entity.screen.ScreenPartyUserRankDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java index 202fc4aa59..b50d74b1a9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPioneerDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPioneerDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PioneerDataFormDTO; -import com.epmet.entity.screen.ScreenPioneerDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPioneerDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java index a4fdc9f221..5bc9ea4130 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenPublicPartiTotalDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenPublicPartiTotalDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.PublicPartiTotalDataFormDTO; -import com.epmet.entity.screen.ScreenPublicPartiTotalDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenPublicPartiTotalDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java index 69422c07c4..a620008b22 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserJoinDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserJoinDao.java @@ -15,10 +15,10 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.screen.ScreenUserJoinEntity; +import com.epmet.entity.evaluationindex.screen.ScreenUserJoinEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java similarity index 94% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java index e0712dee50..5595259af6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenUserTotalDataDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenUserTotalDataDao.java @@ -15,11 +15,11 @@ * along with this program. If not, see . */ -package com.epmet.dao.screen; +package com.epmet.dao.evaluationindex.screen; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.screencoll.form.UserTotalDataFormDTO; -import com.epmet.entity.screen.ScreenUserTotalDataEntity; +import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java new file mode 100644 index 0000000000..879018ac99 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/AgencyScoreEntity.java @@ -0,0 +1,90 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.evaluationindex.indexcal; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_agency_score") +public class AgencyScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织id(eg:社区或者街道id) + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentAgencyId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan + */ + private String indexCode; + + /** + * 数据类型 district :全区;street:街道 + */ + private String dataType; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java index cca1b90ff2..0b21c5de92 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexscore; +package com.epmet.entity.evaluationindex.indexcal; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java new file mode 100644 index 0000000000..8517c59ff1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java @@ -0,0 +1,85 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.evaluationindex.indexcal; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_dept_score") +public class DeptScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 部门id + */ + private String deptId; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 治理能力:zhilinengli; + */ + private String indexCode; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java index 9b1bdf2f73..781dca54bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexscore; +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; -import java.util.Date; /** * 网格相关分值 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java index 24827756fa..47501f13f4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-部门相关数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java index c1c6553ef5..7b0c61a9fd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-网格相关事实表 @@ -82,7 +80,7 @@ public class FactIndexGovrnAblityGridMonthlyEntity extends BaseEpmetEntity { /** * 网格议题转项目率 */ - private BigDecimal avgShiftProjectRatio; + private BigDecimal issueToProjectRatio; /** * 网格总项目数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java index 94eec97d6f..a104561749 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-街道及社区相关数据 @@ -70,7 +68,7 @@ public class FactIndexGovrnAblityOrgMonthlyEntity extends BaseEpmetEntity { private String yearId; /** - * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + * 数据类型 district:全区;street:街道;community:社区;grid:网格 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java index 689c396b2a..550a5ce8a1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 党建能力-党员相关的事实表 @@ -50,7 +48,7 @@ public class FactIndexPartyAblityCpcMonthlyEntity extends BaseEpmetEntity { private String agencyId; /** - * 上级组织Id + * agency_id的上级组织Id */ private String parentId; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java index 208106e87a..b38d4c4d7a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 党建能力-网格相关事实表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java index 1bf023f055..80bcce0819 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 党建能力-街道及社区相关事实表 * @@ -74,7 +71,7 @@ public class FactIndexPartyAblityOrgMonthlyEntity extends BaseEpmetEntity { private Integer publishArticleCount; /** - * 数据类型 allRegion:全区;community:社区;street:街道 + * 数据类型 district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java index d4c6aa6ab6..fedcaf1637 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 服务能力-网格相关事实表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java index 8abeb1c172..a93c7fbae4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 服务能力-组织(街道|社区|全区)相关事实表 * @@ -74,7 +71,7 @@ public class FactIndexServiceAblityOrgMonthlyEntity extends BaseEpmetEntity { private Integer activityCount; /** - * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + * 数据类型 district:全区;street:街道;community:社区;grid:网格 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java index b43e51ad7c..40a112d6d8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 社区相关-党建能力【五级权重】分数表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java index 01b0ff363f..d99cd7b506 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 社区相关分数表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java index 99bc4d0ed1..05ab819f20 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 网格相关分值 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java index 7821fbe41b..042508eae6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java @@ -1,4 +1,4 @@ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java index 299a1dca5c..e0932daeef 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java index ba9d1a3b09..8a1b94fb3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java index bedab6e7f7..0d06fe6955 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java index dcd8c63648..dfe57f7d8d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java index 6a6408f7a1..e22f7e6f2f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java index e649e5e89f..fa70f90897 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层党建-党员基本情况 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java index 96b2e23dfe..e06907ca84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java @@ -14,16 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 组织机构信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java index f020e44cd8..6fdb38f4b8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 部门信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java index 62dddc6960..19fdd132be 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 网格(党支部)信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java index 9a4d3af36b..35f4ca3ee4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层治理-难点堵点(耗时最长|设计部门最多|处理次数) * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java similarity index 98% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java index 0242ab8ce2..ea8b52cd3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java @@ -15,10 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java index fb0e81290b..8609b4f1b9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 中央区-事件数据图片数据 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java index d280785a6c..f60c612d9e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 基层治理-治理能力排行数据(按月统计) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java index fbeb83ba9a..e8d16e858d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 指数-指数数据(每月数值) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java index 259947010d..3c6b62b0e4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 指数-指数数据(按年统计) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java index abbdbb7d20..1c1a893327 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 党建引领-组织先进排行榜 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java index cb870d2de7..34ecdac955 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java @@ -14,16 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层党建-建设情况数据(支部,联建,志愿服务)按月 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java index c663fc770b..0a8d768127 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 党建引领-党员联系群众数据 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java index c542da7085..4d70bf29ff 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 党建引领|基层治理-市民(党员)积分排行榜 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java index b53561b229..a51b8b6449 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 党建引领-先锋模范数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java index 56905509ad..3f38146cc6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 公众参与-各类(话题|议题|项目|注册人数|参与人数)总数 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java index 8a2009d9ca..75668a1215 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 基层治理-公众参与 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java index bc50eaea04..c41ef72cc3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 中央区-各类(用户|党员|党群|话题|议题|项目)总数 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java index 620175e5c5..88e759af17 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -25,6 +25,9 @@ public enum IndexCodeEnum { LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz","组织内党员的联系群众能力考评分(平均值)",5), ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydsyysnlkpfpjz","组织内党员的参与议事能力考评分(平均值)",5), + XIA_SHU_SUO_YOU_WGDDJNLPJZ("xiashusuoyouwgddjnlpjz","下属所有网格的党建能力(平均值)",5), + SHE_QU_XIA_SHU_SYWGZLNLHZPJZ("shequxiashusywgzlnlhzpjz","社区下属所有网格治理能力汇总(平均值)",5), + SHE_QU_XIA_JI_SYWGFWNLDFPJZ("shequxiajisywgfwnldfpjz","社区下级所有网格服务能力得分(平均值) ",5), ; private String code; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index 9267d562a8..eef2856684 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -5,12 +5,12 @@ import com.alibaba.excel.event.AnalysisEventListener; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.UniqueIdGenerator; -import com.epmet.entity.screen.IndexDictEntity; -import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; -import com.epmet.entity.screen.IndexGroupTemplateEntity; -import com.epmet.service.screen.IndexDictService; -import com.epmet.service.screen.IndexGroupDetailTemplateService; -import com.epmet.service.screen.IndexGroupTemplateService; +import com.epmet.entity.evaluationindex.screen.IndexDictEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity; +import com.epmet.service.evaluationindex.screen.IndexDictService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailTemplateService; +import com.epmet.service.evaluationindex.screen.IndexGroupTemplateService; import com.epmet.util.Pinyin4jUtil; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -130,7 +130,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { String level4Index = index.getLevel4Index(); indexDictEntity = indexDicMap.get(level4Index); - IndexGroupTemplateEntity group2 = indexGroupMap.get(index.getLevel1Index() + level4Index); + String level4IndexDetailKey = index.getLevel1Index() + index.getLevel2Index() + level4Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(level4IndexDetailKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); @@ -138,7 +139,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setParentIndexGroupId(group1.getId()); group2.setId(UniqueIdGenerator.generate()); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); - indexGroupMap.put(index.getLevel1Index() + level4Index, group2); + indexGroupMap.put(level4IndexDetailKey, group2); //构建 分组明细 templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + level4Index); if (templateEntity == null) { @@ -154,9 +155,10 @@ public class IndexExcelDataListener extends AnalysisEventListener { } indexDictEntity = indexDicMap.get(index.getLevel5Index()); + String level5IndexDetailKey = index.getLevel1Index() + index.getLevel2Index() + index.getLevel5Index(); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); + templateEntity = indexGroupDetailMap.get(level5IndexDetailKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -165,7 +167,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); - indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); + indexGroupDetailMap.put(level5IndexDetailKey, templateEntity); } } else { //todo 测试完去掉 @@ -183,8 +185,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); String level2Index = index.getLevel2Index(); indexDictEntity = indexDicMap.get(level2Index); - String groupMapKey = index.getLevel1Index() + level2Index; - IndexGroupTemplateEntity group2 = indexGroupMap.get(groupMapKey); + String level2IndexGroupKey = index.getLevel1Index() + level2Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(level2IndexGroupKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); @@ -193,9 +195,9 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setId(UniqueIdGenerator.generate()); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); - indexGroupMap.put(groupMapKey, group2); + indexGroupMap.put(level2IndexGroupKey, group2); //构建 分组明细 - templateEntity = indexGroupDetailMap.get(level2Index); + templateEntity = indexGroupDetailMap.get(level2IndexGroupKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -204,13 +206,14 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); - indexGroupDetailMap.put(groupMapKey, templateEntity); + indexGroupDetailMap.put(level2IndexGroupKey, templateEntity); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); + String level5IndexGroupKey = index.getLevel1Index() + index.getLevel2Index() + index.getLevel5Index(); + templateEntity = indexGroupDetailMap.get(level5IndexGroupKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -219,7 +222,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); - indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); + indexGroupDetailMap.put(level5IndexGroupKey, templateEntity); } } //} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java index 2863952420..8a99d62890 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java @@ -51,4 +51,12 @@ public class IndexCodeFieldReRedis { hashOperations.putAll(RedisKeys.getIndexCodeFieldReKey(), records); redisTemplate.expire(RedisKeys.getIndexCodeFieldReKey(), 1, TimeUnit.DAYS); } + + /** + * desc:删除指标字段关系缓存 + * @return + */ + public Boolean deleteIndexCodeFromRedis() { + return redisTemplate.delete(RedisKeys.getIndexCodeFieldReKey()); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java new file mode 100644 index 0000000000..0805622937 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; + +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface AgencyScoreService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-09-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-09-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return AgencyScoreDTO + * @author generator + * @date 2020-09-02 + */ + AgencyScoreDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void save(AgencyScoreDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void update(AgencyScoreDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-09-02 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java index d65f6d43db..3cd66eccf5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.indexcal.CalculateCommonFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java new file mode 100644 index 0000000000..afb6bc40bc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java @@ -0,0 +1,39 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface DeptScoreService extends BaseService { + /** + * @return java.lang.Boolean + * @param formDTO + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java index 6648205d5c..14d2ac604c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java @@ -1,6 +1,5 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; -import com.epmet.commons.tools.utils.Result; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java new file mode 100644 index 0000000000..09d344dd47 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java @@ -0,0 +1,17 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:33 上午 + */ +public interface IndexCalculateCommunityService { + + /** + * @Description 计算社区相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/1 4:12 下午 + */ + Boolean calCommunityAll(String customerId, String monthId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java similarity index 73% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java index 70c49c77fe..a1ab0ad1bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.screen.form.IndexCalculateForm; @@ -10,7 +10,7 @@ import com.epmet.dto.screen.form.IndexCalculateForm; */ public interface IndexCalculateService { /** - * desc:计算党员相关指标 + * desc:按照客户计算所有指标(按照月份) * @param formDTO * @return */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java new file mode 100644 index 0000000000..c27b6db508 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java @@ -0,0 +1,18 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/9/2 3:11 下午 + */ +public interface IndexCalculateStreetService { + + /** + * @Description 计算街道相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/2 3:12 下午 + */ + Boolean calStreetAll(String customerId, String monthId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java index e54f182903..d2804d1dec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java new file mode 100644 index 0000000000..17f56e6895 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; +import com.epmet.service.evaluationindex.indexcal.AgencyScoreService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class AgencyScoreServiceImpl extends BaseServiceImpl implements AgencyScoreService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, AgencyScoreDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, AgencyScoreDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public AgencyScoreDTO get(String id) { + AgencyScoreEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, AgencyScoreDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index c2d8a924cb..7876c2158e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,20 +1,23 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.screen.IndexCodeFieldReDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dao.evaluationindex.screen.IndexCodeFieldReDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.entity.indexscore.CpcScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.CpcIndexCalculateService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; +import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; import com.epmet.support.normalizing.BigDecimalScoreCalculator; import com.epmet.support.normalizing.Correlation; import com.epmet.support.normalizing.ScoreCalculator; @@ -35,6 +38,7 @@ import java.util.stream.Collectors; @Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; @@ -83,38 +87,35 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { if (totalEntity == null) { totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); totalEntity.setIsTotal(NumConstant.ONE_STR); - totalEntity.setIndexCode(indexGroupDetailEntity.getIndexCode()); + totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); totalEntity.setScore(new BigDecimal(0)); cpcScoreTotalMap.put(userId, totalEntity); } - //todo 自建群活跃度——议题转项目率 有阈值 >60%按60%算 + //自建群活跃度——议题转项目率 有阈值 >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)); } }); - insertBatch(cpcScoreTotalMap.values().stream().collect(Collectors.toList())); + deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(),cpcScoreTotalMap.values().stream().collect(Collectors.toList())); } - private void insertBatch(Collection values) { + private void deleteAndInsertBatch(String customerId, String monthId, String indexCode, Collection values) { + cpcScoreDao.deleteByMonthId(customerId, monthId, indexCode); cpcScoreDao.insertBatch(values); } private void calculatePartScore(CalculateCommonFormDTO formDTO) { - Map indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); - if (CollectionUtils.isEmpty(indexCodeFieldReList)) { - log.error("cpcIndexCalculate have any indexcodefieldre"); - return; - } //计算最大最小值 Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.error("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); - return; + throw new RenException("指标原始数据记录不存在"); } //指标集合 Map> groupIndexDetailsMap = getIndexDetailMap(formDTO); if (groupIndexDetailsMap == null) { + log.error("calculatePartScore"); return; } @@ -152,7 +153,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { IndexInputVO value = entry.getValue(); String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); if (StringUtils.isBlank(fieldName)) { - log.error("cpcIndexCalculate fieldName error"); + log.error("calculateScore indexCode:{} get fieldName return blank", indexCode); continue; } @@ -179,11 +180,15 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { value.getIndexValueVOs().add(currentUserIndexValue); } } - log.warn("计算的参数:{}", indexMap); + log.info("计算的参数:{}", JSON.toJSONString(indexMap)); HashMap result = calculateScore(indexMap); - log.warn("计算的结果:{}", result); + log.info("计算的结果:{}", result); //处理结果 + if (CollectionUtils.isEmpty(result)){ + log.error("calculateScore calculateScore return empty"); + return; + } saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); } @@ -197,14 +202,14 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { */ @Transactional(rollbackFor = Exception.class) public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); + List list = new ArrayList<>(); result.forEach((userId, score) -> { CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); cpcScoreEntity.setScore(score); list.add(cpcScoreEntity); }); - this.insertBatch(list); + this.deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),parentIndexCode,list); } @@ -226,13 +231,20 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); + if (StringUtils.isBlank(fieldName)) { + continue; + } //最小值key String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); //最大值key String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); - minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); - + minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); + //如果最大值超过阈值 则最大值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(new BigDecimal(NumConstant.ONE_NEG)) == NumConstant.ONE){ + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -240,7 +252,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(),new ArrayList<>(),index.getThreshold(),index.getWeight(),scoreCalculator); + IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO); } return map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java new file mode 100644 index 0000000000..d999757956 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.DeptScoreService; +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.util.List; + + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Slf4j +@Service +public class DeptScoreServiceImpl extends BaseServiceImpl implements DeptScoreService { + @Autowired + private IndexGroupDetailService getDetailListByParentCode; + @Autowired + private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; + + /** + * @param formDTO + * @return java.lang.Boolean + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + @Override + public Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO) { + //获取指标权重 + List parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.QU_ZHI_BU_MEN.getCode(), + IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(parentIndexDetails)) { + log.warn("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【区直部门:治理能力】指标权重信息不存在"); + } + log.info(JSON.toJSONString(parentIndexDetails)); + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java similarity index 75% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 7fa8281f15..306c3c7713 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,29 +1,38 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.indexscore.GridScoreDao; -import com.epmet.dao.screen.ScreenCustomerGridDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.*; -import com.epmet.entity.indexscore.GridScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.GridCorreLationService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; -import com.epmet.support.normalizing.*; -import com.epmet.support.normalizing.batch.*; +import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.IndexOutputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -40,9 +49,10 @@ import java.util.stream.Collectors; * @author yinzuomei@elink-cn.com * @date 2020/8/26 10:35 */ +@Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class GridCorreLationServiceImpl implements GridCorreLationService { - private Logger logger = LogManager.getLogger(GridCorreLationServiceImpl.class); @Autowired private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; @Autowired @@ -76,36 +86,33 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(dangJianNengLiList)) { - logger.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:党建能力】指标权重信息不存在"); } calculateGridDangJian(formDTO, dangJianNengLiList); - //2、计算网格相关-治理能力 List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(zhiLiNengLiList)) { - logger.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); } calculateGridZhiLi(formDTO, zhiLiNengLiList); - //3、计算网格相关-服务能力 List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(fuWuNengLiList)) { - logger.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); } calculateGridFuWu(formDTO, fuWuNengLiList); - //4、计算网格相关总分 List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); if (CollectionUtils.isEmpty(wgxgList)) { - logger.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关】指标权重信息不存在"); } calculateGridTotal(formDTO, wgxgList, IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); @@ -127,16 +134,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-党建能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + } else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -155,21 +166,21 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { - //对应的数值 - String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); - //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { + log.info("index_code :{}",key); + if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { //组织内党员的联系群众能力考评分(平均值) - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); //网格内党员的联系群众能力考评分(平均值) String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO, gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); } }); }); @@ -180,6 +191,31 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), NumConstant.ZERO_STR); } + /** + * @param formDTO + * @param indexCode + * @return void + * @author yinzuomei + * @description 只有一条事实记录时,分值默认赋50 + * @Date 2020/9/2 14:35 + **/ + private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) { + List> resultMapList = new ArrayList<>(); + HashMap resultMap = new HashMap<>(); + String gridId =null; + if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexPartyAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.ZHI_LI_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexGovrnAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.FU_WU_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexServiceAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } + resultMap.put(gridId, new BigDecimal(NumConstant.FIFTY_STR)); + resultMapList.add(resultMap); + // 保存中间表 + saveGridCorreLationResult(formDTO, resultMapList, indexCode, NumConstant.ZERO_STR); + } + /** * @param calculateCommonFormDTO * @return java.util.Map @@ -199,6 +235,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + //FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("24.35")); + map.put(StrConstant.MAX, new BigDecimal("46.13"));*/ return map; } @@ -215,6 +254,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("24.43"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("46.13"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("24.35"); + }*/ return result; } @@ -231,6 +279,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("29.40"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("18.30"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("9.15"); + }*/ return result; } @@ -253,6 +310,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + // FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("9.15")); + map.put(StrConstant.MAX, new BigDecimal("29.4"));*/ return map; } @@ -275,7 +335,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { String yearId = DateUtils.getYearId(formDTO.getMonthId()); for (HashMap resultMap : resultMapList) { resultMap.forEach((gridId, partyAblityScore) -> { - logger.info("网格id:" + gridId + ";分值:" + partyAblityScore); + log.info("网格id:" + gridId + ";index_Code:"+indexCode+";分值:" + partyAblityScore); GridScoreEntity gridScoreEntity = new GridScoreEntity(); gridScoreEntity.setCustomerId(formDTO.getCustomerId()); gridScoreEntity.setGridId(gridId); @@ -283,8 +343,12 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setIndexCode(indexCode); ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(formDTO.getCustomerId(), gridId); if (null != screenCustomerGridDTO) { - gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); - gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + if(StringUtils.isNotBlank(screenCustomerGridDTO.getParentAgencyId())){ + gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); + } + if(StringUtils.isNotBlank(screenCustomerGridDTO.getAllParentIds())){ + gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + } } gridScoreEntity.setQuarterId(quarterId); gridScoreEntity.setYearId(yearId); @@ -309,10 +373,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); - logger.info("计算的参数:{}", indexInputVOS); + log.info("计算的参数"+JSON.toJSONString(indexInputVOS)); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + + //如果想看每一个指标的分值调用下面的方法 + List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + log.info("计算的结果(List)"+JSON.toJSONString(listTemp)); + HashMap resultMap = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - logger.info("计算的结果:{}", resultMap); + log.info("计算的结果{}", resultMap); return resultMap; } @@ -344,23 +413,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private Map> buildGridCorrelationIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); for (IndexGroupDetailEntity index : indexList) { -// IndexInputVO indexInputVO = new IndexInputVO(); - // 指标code -// indexInputVO.setIndexId(index.getIndexCode()); - //阈值 -// indexInputVO.setThreshold(index.getThreshold()); - //权重 -// indexInputVO.setWeight(index.getWeight()); BigDecimal minValue = null; BigDecimal maxValue = null; if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { //组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值 - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); Map contactMassesAblityMap = this.getContactMassesAblityMap(formDTO); minValue = contactMassesAblityMap.get(StrConstant.MIN); maxValue = contactMassesAblityMap.get(StrConstant.MAX); } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(index.getIndexCode())) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); Map joinIssueAblityMap = this.getJoinIssueAblityMap(formDTO); minValue = joinIssueAblityMap.get(StrConstant.MIN); maxValue = joinIssueAblityMap.get(StrConstant.MAX); @@ -368,15 +430,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); if (StringUtils.isBlank(fieldName)) { - logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); + log.error("index_code:{} not find field_name",index.getIndexCode()); continue; } - logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); +// log.info("index_code2:{} ,field_name:{}",index.getIndexCode(),fieldName); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); } + //有阈值,且最大值>阈值,则最大值赋值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG_STR).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(index.getThreshold()) == NumConstant.ONE) { + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -384,12 +451,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); -// indexInputVO.setScoreCalculator(scoreCalculator); List> sampleValueList = new ArrayList<>(); -// indexInputVO.setIndexValueVOs(sampleValueList); IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), sampleValueList, index.getThreshold(), +// new BigDecimal("-1"),//FOR TEST index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO1); @@ -409,16 +475,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -437,19 +507,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); + String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); + BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); + SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); + value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); //构造样本值对象 SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); - String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); - BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); - SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); - value.getIndexValueVOs().add(contactMassesAblityValue); } }); }); @@ -471,18 +540,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private void calculateGridFuWu(CalculateCommonFormDTO formDTO, List indexList) { //查询总记录数 - int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); + int total = factIndexServiceAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -501,7 +574,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); @@ -509,7 +581,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); } else { - logger.error("index_code:" + key + " not find field_name"); + log.error("index_code:" + key + " not find field_name"); } }); }); @@ -532,25 +604,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 List gridScoreDTOList = gridScoreDao.selectList(formDTO); if(CollectionUtils.isEmpty(gridScoreDTOList)){ - logger.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); + log.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); throw new RenException("客户一级指标分值记录不存在"); } Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List gridScoreEntityList = new ArrayList<>(); for (GridScoreDTO gridScoreDTO : gridScoreDTOList) { - GridScoreEntity gridScoreEntity = new GridScoreEntity(); - gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); - gridScoreEntity.setGridId(gridScoreDTO.getGridId()); + GridScoreEntity gridScoreEntity = ConvertUtils.sourceToTarget(gridScoreDTO, GridScoreEntity.class); gridScoreEntity.setIsTotal(NumConstant.ONE_STR); gridScoreEntity.setIndexCode(indexCode); - gridScoreEntity.setAgencyId(gridScoreDTO.getAgencyId()); - gridScoreEntity.setAllParentIds(gridScoreDTO.getAllParentIds()); - gridScoreEntity.setQuarterId(gridScoreDTO.getQuarterId()); - gridScoreEntity.setYearId(gridScoreDTO.getYearId()); - gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); gridScoreEntity.setScore(BigDecimal.ZERO); if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { - logger.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); + log.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); continue; } for (GridScoreDetailDTO gridScoreDetailDTO : gridScoreDTO.getDetailList()) { @@ -565,14 +630,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } } - public static void main(String[] args) { - BigDecimal totalScore = BigDecimal.ZERO; - for (int i = 1; i < 5; i++) { - totalScore = totalScore.add(new BigDecimal("1.00")); - } - System.out.println(totalScore); - } - /** * @param customerId * @return com.epmet.dto.indexcal.CustomerGridInfoDTO diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java new file mode 100644 index 0000000000..229c3059de --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -0,0 +1,428 @@ +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.druid.util.StringUtils; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao; +import com.epmet.dao.evaluationindex.screen.FactIndexGridScoreDao; +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; +import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; +import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; +import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; +import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:34 上午 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommunityService { + + @Autowired + private FactIndexPartyAblityOrgMonthlyDao factIndexPartyAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityOrgMonthlyDao factIndexGovrnAblityOrgMonthlyDao; + @Autowired + private FactIndexServiceAblityOrgMonthlyDao factIndexServiceAblityOrgMonthlyDao; + @Autowired + private IndexGroupDetailService indexGroupDetailService; + @Autowired + private IndexCodeFieldReService indexCodeFieldReService; + @Autowired + private FactIndexCommunityScoreDao factIndexCommunityScoreDao; + @Autowired + private FactIndexGridScoreDao factIndexGridScoreDao; + + /** + * @param customerId + * @Description 社区名义发文数量计算【党建能力】 + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityPartyCalculate(String customerId, String monthId) { + // 党建能力 + // 根据all_parent_index_code 获取指标明细 + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + //下属所有网格的党建能力平均值 + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(customerId, monthId); + if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { + log.error("查询下属所有网格的党建能力平均值集合为空"); + return; + }else if (subGridPartyAvgScore.size() == NumConstant.ONE){ + sizeOne(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (subGridPartyAvgScore.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexEnd = NumConstant.TEN; + List> partition = ListUtils.partition(subGridPartyAvgScore, indexEnd); + partition.forEach(publish -> { + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 社区名义发文数量 + List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(mapList)) { + log.error("查询社区名义发文数量集合为空"); + return; + } + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + }else if (mapList.size() == NumConstant.ONE){ + sizeOne(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (mapList.size() > NumConstant.ONE) { + List decimalList = mapList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> publishArticleList = ListUtils.partition(mapList, 10); + publishArticleList.forEach(publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区治理能力 + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityGovernAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridGovernAvgScore(customerId, monthId); + if (subGridGovernAvg.size() == NumConstant.ONE) { + sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (subGridGovernAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(subGridGovernAvg, 10); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 治理能力的六个五级指标 + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityGovernAbility)){ + log.error("查询治理能力的六个五级指标集合为空"); + return; + }else if (communityGovernAbility.size() == NumConstant.ONE) { + sizeOne(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (communityGovernAbility.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> governAbilityList = ListUtils.partition(communityGovernAbility, 10); + governAbilityList.forEach(governAbility -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + governAbility.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区服务能力 + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityServiceAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + String indexCode = detail.getIndexCode(); + if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); + if (subGridServiceAvg.size() == NumConstant.ONE) { + sizeOne(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId().toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (subGridServiceAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10); + serviceAvgList.forEach(serviceAvg -> { + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + serviceAvg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } else { + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityActivityCountList)) { + log.error("查询社区活动组织次数集合为空"); + return; + }else if (communityActivityCountList.size() == NumConstant.ONE) { + sizeOne(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (communityActivityCountList.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> communityActivityList = ListUtils.partition(communityActivityCountList, 10); + communityActivityList.forEach(communityActivity -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + communityActivity.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.FU_WU_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区相关计算 + * @author zxc + * @date 2020/9/1 9:21 上午 + */ + public Boolean communityRelate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List
+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.evaluationindex.indexcal; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_agency_score") +public class AgencyScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 组织id(eg:社区或者街道id) + */ + private String agencyId; + + /** + * 上级组织id + */ + private String parentAgencyId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;街道相关:jiedaoxiangguan;全区相关:quanquxiangguan + */ + private String indexCode; + + /** + * 数据类型 district :全区;street:街道 + */ + private String dataType; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java index cca1b90ff2..0b21c5de92 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/CpcScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/CpcScoreEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexscore; +package com.epmet.entity.evaluationindex.indexcal; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java new file mode 100644 index 0000000000..8517c59ff1 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/DeptScoreEntity.java @@ -0,0 +1,85 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *
+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity.evaluationindex.indexcal; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("fact_index_dept_score") +public class DeptScoreEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 部门id + */ + private String deptId; + + /** + * 所有上级ID,用英文逗号分开 + */ + private String allParentIds; + + /** + * 季度id: yyyyQ1、yyyyQ2、yyyyQ3、yyyyQ4 + */ + private String quarterId; + + /** + * 年度ID: yyyy + */ + private String yearId; + + /** + * 月维度Id: yyyyMM + */ + private String monthId; + + /** + * 1:总分;0不是;默认0 + */ + private String isTotal; + + /** + * 分值 + */ + private BigDecimal score; + + /** + * 治理能力:zhilinengli; + */ + private String indexCode; + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java index 9b1bdf2f73..781dca54bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexscore/GridScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcal/GridScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexscore; +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; -import java.util.Date; /** * 网格相关分值 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java index 24827756fa..47501f13f4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityDeptMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-部门相关数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java similarity index 95% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java index c1c6553ef5..7b0c61a9fd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-网格相关事实表 @@ -82,7 +80,7 @@ public class FactIndexGovrnAblityGridMonthlyEntity extends BaseEpmetEntity { /** * 网格议题转项目率 */ - private BigDecimal avgShiftProjectRatio; + private BigDecimal issueToProjectRatio; /** * 网格总项目数 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java index 94eec97d6f..a104561749 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 治理能力-街道及社区相关数据 @@ -70,7 +68,7 @@ public class FactIndexGovrnAblityOrgMonthlyEntity extends BaseEpmetEntity { private String yearId; /** - * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + * 数据类型 district:全区;street:街道;community:社区;grid:网格 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java index 689c396b2a..550a5ce8a1 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityCpcMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 党建能力-党员相关的事实表 @@ -50,7 +48,7 @@ public class FactIndexPartyAblityCpcMonthlyEntity extends BaseEpmetEntity { private String agencyId; /** - * 上级组织Id + * agency_id的上级组织Id */ private String parentId; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java index 208106e87a..b38d4c4d7a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 党建能力-网格相关事实表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java index 1bf023f055..80bcce0819 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 党建能力-街道及社区相关事实表 * @@ -74,7 +71,7 @@ public class FactIndexPartyAblityOrgMonthlyEntity extends BaseEpmetEntity { private Integer publishArticleCount; /** - * 数据类型 allRegion:全区;community:社区;street:街道 + * 数据类型 district:全区;community:社区;street:街道 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java index d4c6aa6ab6..fedcaf1637 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityGridMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.math.BigDecimal; -import java.util.Date; /** * 服务能力-网格相关事实表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java similarity index 92% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java index 8abeb1c172..a93c7fbae4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.indexcoll; +package com.epmet.entity.evaluationindex.indexcoll; import com.baomidou.mybatisplus.annotation.TableName; - import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.Date; - /** * 服务能力-组织(街道|社区|全区)相关事实表 * @@ -74,7 +71,7 @@ public class FactIndexServiceAblityOrgMonthlyEntity extends BaseEpmetEntity { private Integer activityCount; /** - * 数据类型 allRegion:全区;street:街道;community:社区;grid:网格 + * 数据类型 district:全区;street:街道;community:社区;grid:网格 */ private String dataType; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java index b43e51ad7c..40a112d6d8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityFiveScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityFiveScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 社区相关-党建能力【五级权重】分数表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java index 01b0ff363f..d99cd7b506 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexCommunityScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexCommunityScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 社区相关分数表 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java index 99bc4d0ed1..05ab819f20 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/FactIndexGridScoreEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/FactIndexGridScoreEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 网格相关分值 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java index 7821fbe41b..042508eae6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexCodeFieldReEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexCodeFieldReEntity.java @@ -1,4 +1,4 @@ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java index 299a1dca5c..e0932daeef 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexDictEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexDictEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java index ba9d1a3b09..8a1b94fb3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java index bedab6e7f7..0d06fe6955 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupDetailTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupDetailTemplateEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java index dcd8c63648..dfe57f7d8d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java index 6a6408f7a1..e22f7e6f2f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/IndexGroupTemplateEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/IndexGroupTemplateEntity.java @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +package com.epmet.entity.evaluationindex.screen; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java index e649e5e89f..fa70f90897 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCpcBaseDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCpcBaseDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层党建-党员基本情况 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java index 96b2e23dfe..e06907ca84 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerAgencyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerAgencyEntity.java @@ -14,16 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 组织机构信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java index f020e44cd8..6fdb38f4b8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerDeptEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerDeptEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 部门信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java index 62dddc6960..19fdd132be 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenCustomerGridEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenCustomerGridEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 网格(党支部)信息 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java index 9a4d3af36b..35f4ca3ee4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenDifficultyDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenDifficultyDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层治理-难点堵点(耗时最长|设计部门最多|处理次数) * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java similarity index 98% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java index 0242ab8ce2..ea8b52cd3c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventDataEntity.java @@ -15,10 +15,9 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java index fb0e81290b..8609b4f1b9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenEventImgDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenEventImgDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 中央区-事件数据图片数据 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java index d280785a6c..f60c612d9e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenGovernRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenGovernRankDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 基层治理-治理能力排行数据(按月统计) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java index fbeb83ba9a..e8d16e858d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataMonthlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataMonthlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 指数-指数数据(每月数值) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java index 259947010d..3c6b62b0e4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenIndexDataYearlyEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenIndexDataYearlyEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 指数-指数数据(按年统计) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java index abbdbb7d20..1c1a893327 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenOrgRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenOrgRankDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 党建引领-组织先进排行榜 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java index cb870d2de7..34ecdac955 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyBranchDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyBranchDataEntity.java @@ -14,16 +14,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 基层党建-建设情况数据(支部,联建,志愿服务)按月 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java similarity index 96% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java index c663fc770b..0a8d768127 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyLinkMassesDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyLinkMassesDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 党建引领-党员联系群众数据 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java index c542da7085..4d70bf29ff 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPartyUserRankDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPartyUserRankDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 党建引领|基层治理-市民(党员)积分排行榜 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java index b53561b229..a51b8b6449 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPioneerDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPioneerDataEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 党建引领-先锋模范数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java index 56905509ad..3f38146cc6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenPublicPartiTotalDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenPublicPartiTotalDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 公众参与-各类(话题|议题|项目|注册人数|参与人数)总数 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java index 8a2009d9ca..75668a1215 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserJoinEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserJoinEntity.java @@ -15,16 +15,14 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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; -import java.util.Date; /** * 基层治理-公众参与 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java similarity index 97% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java index bc50eaea04..c41ef72cc3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/screen/ScreenUserTotalDataEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/screen/ScreenUserTotalDataEntity.java @@ -15,16 +15,13 @@ * along with this program. If not, see . */ -package com.epmet.entity.screen; +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.util.Date; - /** * 中央区-各类(用户|党员|党群|话题|议题|项目)总数 * diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java index 620175e5c5..88e759af17 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/eum/IndexCodeEnum.java @@ -25,6 +25,9 @@ public enum IndexCodeEnum { LIAN_XI_QUN_ZHONG("lianxiqunzhong", "联系群众", 4), ZUZHINEIDANGYDLXQZNLKPFPJZ("zuzhineidangydlxqznlkpfpjz","组织内党员的联系群众能力考评分(平均值)",5), ZUZHINEIDANGYDSYYSNLKPFPJZ("zuzhineidangydsyysnlkpfpjz","组织内党员的参与议事能力考评分(平均值)",5), + XIA_SHU_SUO_YOU_WGDDJNLPJZ("xiashusuoyouwgddjnlpjz","下属所有网格的党建能力(平均值)",5), + SHE_QU_XIA_SHU_SYWGZLNLHZPJZ("shequxiashusywgzlnlhzpjz","社区下属所有网格治理能力汇总(平均值)",5), + SHE_QU_XIA_JI_SYWGFWNLDFPJZ("shequxiajisywgfwnldfpjz","社区下级所有网格服务能力得分(平均值) ",5), ; private String code; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java index 9267d562a8..eef2856684 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/model/IndexExcelDataListener.java @@ -5,12 +5,12 @@ import com.alibaba.excel.event.AnalysisEventListener; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.UniqueIdGenerator; -import com.epmet.entity.screen.IndexDictEntity; -import com.epmet.entity.screen.IndexGroupDetailTemplateEntity; -import com.epmet.entity.screen.IndexGroupTemplateEntity; -import com.epmet.service.screen.IndexDictService; -import com.epmet.service.screen.IndexGroupDetailTemplateService; -import com.epmet.service.screen.IndexGroupTemplateService; +import com.epmet.entity.evaluationindex.screen.IndexDictEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailTemplateEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupTemplateEntity; +import com.epmet.service.evaluationindex.screen.IndexDictService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailTemplateService; +import com.epmet.service.evaluationindex.screen.IndexGroupTemplateService; import com.epmet.util.Pinyin4jUtil; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -130,7 +130,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { String level4Index = index.getLevel4Index(); indexDictEntity = indexDicMap.get(level4Index); - IndexGroupTemplateEntity group2 = indexGroupMap.get(index.getLevel1Index() + level4Index); + String level4IndexDetailKey = index.getLevel1Index() + index.getLevel2Index() + level4Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(level4IndexDetailKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); @@ -138,7 +139,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setParentIndexGroupId(group1.getId()); group2.setId(UniqueIdGenerator.generate()); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); - indexGroupMap.put(index.getLevel1Index() + level4Index, group2); + indexGroupMap.put(level4IndexDetailKey, group2); //构建 分组明细 templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + level4Index); if (templateEntity == null) { @@ -154,9 +155,10 @@ public class IndexExcelDataListener extends AnalysisEventListener { } indexDictEntity = indexDicMap.get(index.getLevel5Index()); + String level5IndexDetailKey = index.getLevel1Index() + index.getLevel2Index() + index.getLevel5Index(); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); + templateEntity = indexGroupDetailMap.get(level5IndexDetailKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -165,7 +167,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); - indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); + indexGroupDetailMap.put(level5IndexDetailKey, templateEntity); } } else { //todo 测试完去掉 @@ -183,8 +185,8 @@ public class IndexExcelDataListener extends AnalysisEventListener { StringBuilder allIndexCodeSb = new StringBuilder(group1.getIndexCode()); String level2Index = index.getLevel2Index(); indexDictEntity = indexDicMap.get(level2Index); - String groupMapKey = index.getLevel1Index() + level2Index; - IndexGroupTemplateEntity group2 = indexGroupMap.get(groupMapKey); + String level2IndexGroupKey = index.getLevel1Index() + level2Index; + IndexGroupTemplateEntity group2 = indexGroupMap.get(level2IndexGroupKey); IndexGroupDetailTemplateEntity templateEntity = null; if (group2 == null) { group2 = new IndexGroupTemplateEntity(); @@ -193,9 +195,9 @@ public class IndexExcelDataListener extends AnalysisEventListener { group2.setId(UniqueIdGenerator.generate()); group2.setIndexCode(Pinyin4jUtil.getSpellPinYin(indexDictEntity.getIndexName(), false, 4)); - indexGroupMap.put(groupMapKey, group2); + indexGroupMap.put(level2IndexGroupKey, group2); //构建 分组明细 - templateEntity = indexGroupDetailMap.get(level2Index); + templateEntity = indexGroupDetailMap.get(level2IndexGroupKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -204,13 +206,14 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 2); - indexGroupDetailMap.put(groupMapKey, templateEntity); + indexGroupDetailMap.put(level2IndexGroupKey, templateEntity); } } indexDictEntity = indexDicMap.get(index.getLevel5Index()); allIndexCodeSb.append(StrConstant.COLON); allIndexCodeSb.append(group2.getIndexCode()); - templateEntity = indexGroupDetailMap.get(index.getLevel1Index() + index.getLevel5Index()); + String level5IndexGroupKey = index.getLevel1Index() + index.getLevel2Index() + index.getLevel5Index(); + templateEntity = indexGroupDetailMap.get(level5IndexGroupKey); if (templateEntity == null) { templateEntity = new IndexGroupDetailTemplateEntity(); templateEntity.setIndexGroupId(group2.getId()); @@ -219,7 +222,7 @@ public class IndexExcelDataListener extends AnalysisEventListener { templateEntity.setId(UniqueIdGenerator.generate()); templateEntity.setCorrelation(index.getCorrelation()); buildIndexGroupDetail(templateEntity, indexDictEntity, index, 5); - indexGroupDetailMap.put(index.getLevel1Index() + index.getLevel5Index(), templateEntity); + indexGroupDetailMap.put(level5IndexGroupKey, templateEntity); } } //} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java index 2863952420..8a99d62890 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/redis/IndexCodeFieldReRedis.java @@ -51,4 +51,12 @@ public class IndexCodeFieldReRedis { hashOperations.putAll(RedisKeys.getIndexCodeFieldReKey(), records); redisTemplate.expire(RedisKeys.getIndexCodeFieldReKey(), 1, TimeUnit.DAYS); } + + /** + * desc:删除指标字段关系缓存 + * @return + */ + public Boolean deleteIndexCodeFromRedis() { + return redisTemplate.delete(RedisKeys.getIndexCodeFieldReKey()); + } } \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java new file mode 100644 index 0000000000..0805622937 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/AgencyScoreService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; + +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface AgencyScoreService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-09-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-09-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return AgencyScoreDTO + * @author generator + * @date 2020-09-02 + */ + AgencyScoreDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void save(AgencyScoreDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void update(AgencyScoreDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-09-02 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java index d65f6d43db..3cd66eccf5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.indexcal.CalculateCommonFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java new file mode 100644 index 0000000000..afb6bc40bc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java @@ -0,0 +1,39 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface DeptScoreService extends BaseService { + /** + * @return java.lang.Boolean + * @param formDTO + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java index 6648205d5c..14d2ac604c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java @@ -1,6 +1,5 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; -import com.epmet.commons.tools.utils.Result; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java new file mode 100644 index 0000000000..09d344dd47 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java @@ -0,0 +1,17 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:33 上午 + */ +public interface IndexCalculateCommunityService { + + /** + * @Description 计算社区相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/1 4:12 下午 + */ + Boolean calCommunityAll(String customerId, String monthId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java similarity index 73% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java index 70c49c77fe..a1ab0ad1bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.screen.form.IndexCalculateForm; @@ -10,7 +10,7 @@ import com.epmet.dto.screen.form.IndexCalculateForm; */ public interface IndexCalculateService { /** - * desc:计算党员相关指标 + * desc:按照客户计算所有指标(按照月份) * @param formDTO * @return */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java new file mode 100644 index 0000000000..c27b6db508 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java @@ -0,0 +1,18 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/9/2 3:11 下午 + */ +public interface IndexCalculateStreetService { + + /** + * @Description 计算街道相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/2 3:12 下午 + */ + Boolean calStreetAll(String customerId, String monthId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java index e54f182903..d2804d1dec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java new file mode 100644 index 0000000000..17f56e6895 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; +import com.epmet.service.evaluationindex.indexcal.AgencyScoreService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class AgencyScoreServiceImpl extends BaseServiceImpl implements AgencyScoreService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, AgencyScoreDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, AgencyScoreDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public AgencyScoreDTO get(String id) { + AgencyScoreEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, AgencyScoreDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index c2d8a924cb..7876c2158e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,20 +1,23 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.screen.IndexCodeFieldReDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dao.evaluationindex.screen.IndexCodeFieldReDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.entity.indexscore.CpcScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.CpcIndexCalculateService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; +import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; import com.epmet.support.normalizing.BigDecimalScoreCalculator; import com.epmet.support.normalizing.Correlation; import com.epmet.support.normalizing.ScoreCalculator; @@ -35,6 +38,7 @@ import java.util.stream.Collectors; @Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; @@ -83,38 +87,35 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { if (totalEntity == null) { totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); totalEntity.setIsTotal(NumConstant.ONE_STR); - totalEntity.setIndexCode(indexGroupDetailEntity.getIndexCode()); + totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); totalEntity.setScore(new BigDecimal(0)); cpcScoreTotalMap.put(userId, totalEntity); } - //todo 自建群活跃度——议题转项目率 有阈值 >60%按60%算 + //自建群活跃度——议题转项目率 有阈值 >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)); } }); - insertBatch(cpcScoreTotalMap.values().stream().collect(Collectors.toList())); + deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(),cpcScoreTotalMap.values().stream().collect(Collectors.toList())); } - private void insertBatch(Collection values) { + private void deleteAndInsertBatch(String customerId, String monthId, String indexCode, Collection values) { + cpcScoreDao.deleteByMonthId(customerId, monthId, indexCode); cpcScoreDao.insertBatch(values); } private void calculatePartScore(CalculateCommonFormDTO formDTO) { - Map indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); - if (CollectionUtils.isEmpty(indexCodeFieldReList)) { - log.error("cpcIndexCalculate have any indexcodefieldre"); - return; - } //计算最大最小值 Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.error("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); - return; + throw new RenException("指标原始数据记录不存在"); } //指标集合 Map> groupIndexDetailsMap = getIndexDetailMap(formDTO); if (groupIndexDetailsMap == null) { + log.error("calculatePartScore"); return; } @@ -152,7 +153,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { IndexInputVO value = entry.getValue(); String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); if (StringUtils.isBlank(fieldName)) { - log.error("cpcIndexCalculate fieldName error"); + log.error("calculateScore indexCode:{} get fieldName return blank", indexCode); continue; } @@ -179,11 +180,15 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { value.getIndexValueVOs().add(currentUserIndexValue); } } - log.warn("计算的参数:{}", indexMap); + log.info("计算的参数:{}", JSON.toJSONString(indexMap)); HashMap result = calculateScore(indexMap); - log.warn("计算的结果:{}", result); + log.info("计算的结果:{}", result); //处理结果 + if (CollectionUtils.isEmpty(result)){ + log.error("calculateScore calculateScore return empty"); + return; + } saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); } @@ -197,14 +202,14 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { */ @Transactional(rollbackFor = Exception.class) public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); + List list = new ArrayList<>(); result.forEach((userId, score) -> { CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); cpcScoreEntity.setScore(score); list.add(cpcScoreEntity); }); - this.insertBatch(list); + this.deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),parentIndexCode,list); } @@ -226,13 +231,20 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); + if (StringUtils.isBlank(fieldName)) { + continue; + } //最小值key String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); //最大值key String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); - minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); - + minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); + //如果最大值超过阈值 则最大值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(new BigDecimal(NumConstant.ONE_NEG)) == NumConstant.ONE){ + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -240,7 +252,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(),new ArrayList<>(),index.getThreshold(),index.getWeight(),scoreCalculator); + IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO); } return map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java new file mode 100644 index 0000000000..d999757956 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.DeptScoreService; +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.util.List; + + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Slf4j +@Service +public class DeptScoreServiceImpl extends BaseServiceImpl implements DeptScoreService { + @Autowired + private IndexGroupDetailService getDetailListByParentCode; + @Autowired + private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; + + /** + * @param formDTO + * @return java.lang.Boolean + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + @Override + public Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO) { + //获取指标权重 + List parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.QU_ZHI_BU_MEN.getCode(), + IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(parentIndexDetails)) { + log.warn("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【区直部门:治理能力】指标权重信息不存在"); + } + log.info(JSON.toJSONString(parentIndexDetails)); + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java similarity index 75% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 7fa8281f15..306c3c7713 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,29 +1,38 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.indexscore.GridScoreDao; -import com.epmet.dao.screen.ScreenCustomerGridDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.*; -import com.epmet.entity.indexscore.GridScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.GridCorreLationService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; -import com.epmet.support.normalizing.*; -import com.epmet.support.normalizing.batch.*; +import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.IndexOutputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -40,9 +49,10 @@ import java.util.stream.Collectors; * @author yinzuomei@elink-cn.com * @date 2020/8/26 10:35 */ +@Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class GridCorreLationServiceImpl implements GridCorreLationService { - private Logger logger = LogManager.getLogger(GridCorreLationServiceImpl.class); @Autowired private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; @Autowired @@ -76,36 +86,33 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(dangJianNengLiList)) { - logger.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:党建能力】指标权重信息不存在"); } calculateGridDangJian(formDTO, dangJianNengLiList); - //2、计算网格相关-治理能力 List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(zhiLiNengLiList)) { - logger.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); } calculateGridZhiLi(formDTO, zhiLiNengLiList); - //3、计算网格相关-服务能力 List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(fuWuNengLiList)) { - logger.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); } calculateGridFuWu(formDTO, fuWuNengLiList); - //4、计算网格相关总分 List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); if (CollectionUtils.isEmpty(wgxgList)) { - logger.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关】指标权重信息不存在"); } calculateGridTotal(formDTO, wgxgList, IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); @@ -127,16 +134,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-党建能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + } else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -155,21 +166,21 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { - //对应的数值 - String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); - //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { + log.info("index_code :{}",key); + if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { //组织内党员的联系群众能力考评分(平均值) - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); //网格内党员的联系群众能力考评分(平均值) String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO, gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); } }); }); @@ -180,6 +191,31 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), NumConstant.ZERO_STR); } + /** + * @param formDTO + * @param indexCode + * @return void + * @author yinzuomei + * @description 只有一条事实记录时,分值默认赋50 + * @Date 2020/9/2 14:35 + **/ + private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) { + List> resultMapList = new ArrayList<>(); + HashMap resultMap = new HashMap<>(); + String gridId =null; + if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexPartyAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.ZHI_LI_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexGovrnAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.FU_WU_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexServiceAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } + resultMap.put(gridId, new BigDecimal(NumConstant.FIFTY_STR)); + resultMapList.add(resultMap); + // 保存中间表 + saveGridCorreLationResult(formDTO, resultMapList, indexCode, NumConstant.ZERO_STR); + } + /** * @param calculateCommonFormDTO * @return java.util.Map @@ -199,6 +235,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + //FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("24.35")); + map.put(StrConstant.MAX, new BigDecimal("46.13"));*/ return map; } @@ -215,6 +254,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("24.43"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("46.13"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("24.35"); + }*/ return result; } @@ -231,6 +279,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("29.40"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("18.30"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("9.15"); + }*/ return result; } @@ -253,6 +310,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + // FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("9.15")); + map.put(StrConstant.MAX, new BigDecimal("29.4"));*/ return map; } @@ -275,7 +335,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { String yearId = DateUtils.getYearId(formDTO.getMonthId()); for (HashMap resultMap : resultMapList) { resultMap.forEach((gridId, partyAblityScore) -> { - logger.info("网格id:" + gridId + ";分值:" + partyAblityScore); + log.info("网格id:" + gridId + ";index_Code:"+indexCode+";分值:" + partyAblityScore); GridScoreEntity gridScoreEntity = new GridScoreEntity(); gridScoreEntity.setCustomerId(formDTO.getCustomerId()); gridScoreEntity.setGridId(gridId); @@ -283,8 +343,12 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setIndexCode(indexCode); ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(formDTO.getCustomerId(), gridId); if (null != screenCustomerGridDTO) { - gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); - gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + if(StringUtils.isNotBlank(screenCustomerGridDTO.getParentAgencyId())){ + gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); + } + if(StringUtils.isNotBlank(screenCustomerGridDTO.getAllParentIds())){ + gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + } } gridScoreEntity.setQuarterId(quarterId); gridScoreEntity.setYearId(yearId); @@ -309,10 +373,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); - logger.info("计算的参数:{}", indexInputVOS); + log.info("计算的参数"+JSON.toJSONString(indexInputVOS)); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + + //如果想看每一个指标的分值调用下面的方法 + List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + log.info("计算的结果(List)"+JSON.toJSONString(listTemp)); + HashMap resultMap = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - logger.info("计算的结果:{}", resultMap); + log.info("计算的结果{}", resultMap); return resultMap; } @@ -344,23 +413,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private Map> buildGridCorrelationIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); for (IndexGroupDetailEntity index : indexList) { -// IndexInputVO indexInputVO = new IndexInputVO(); - // 指标code -// indexInputVO.setIndexId(index.getIndexCode()); - //阈值 -// indexInputVO.setThreshold(index.getThreshold()); - //权重 -// indexInputVO.setWeight(index.getWeight()); BigDecimal minValue = null; BigDecimal maxValue = null; if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { //组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值 - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); Map contactMassesAblityMap = this.getContactMassesAblityMap(formDTO); minValue = contactMassesAblityMap.get(StrConstant.MIN); maxValue = contactMassesAblityMap.get(StrConstant.MAX); } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(index.getIndexCode())) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); Map joinIssueAblityMap = this.getJoinIssueAblityMap(formDTO); minValue = joinIssueAblityMap.get(StrConstant.MIN); maxValue = joinIssueAblityMap.get(StrConstant.MAX); @@ -368,15 +430,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); if (StringUtils.isBlank(fieldName)) { - logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); + log.error("index_code:{} not find field_name",index.getIndexCode()); continue; } - logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); +// log.info("index_code2:{} ,field_name:{}",index.getIndexCode(),fieldName); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); } + //有阈值,且最大值>阈值,则最大值赋值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG_STR).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(index.getThreshold()) == NumConstant.ONE) { + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -384,12 +451,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); -// indexInputVO.setScoreCalculator(scoreCalculator); List> sampleValueList = new ArrayList<>(); -// indexInputVO.setIndexValueVOs(sampleValueList); IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), sampleValueList, index.getThreshold(), +// new BigDecimal("-1"),//FOR TEST index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO1); @@ -409,16 +475,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -437,19 +507,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); + String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); + BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); + SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); + value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); //构造样本值对象 SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); - String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); - BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); - SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); - value.getIndexValueVOs().add(contactMassesAblityValue); } }); }); @@ -471,18 +540,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private void calculateGridFuWu(CalculateCommonFormDTO formDTO, List indexList) { //查询总记录数 - int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); + int total = factIndexServiceAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -501,7 +574,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); @@ -509,7 +581,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); } else { - logger.error("index_code:" + key + " not find field_name"); + log.error("index_code:" + key + " not find field_name"); } }); }); @@ -532,25 +604,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 List gridScoreDTOList = gridScoreDao.selectList(formDTO); if(CollectionUtils.isEmpty(gridScoreDTOList)){ - logger.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); + log.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); throw new RenException("客户一级指标分值记录不存在"); } Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List gridScoreEntityList = new ArrayList<>(); for (GridScoreDTO gridScoreDTO : gridScoreDTOList) { - GridScoreEntity gridScoreEntity = new GridScoreEntity(); - gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); - gridScoreEntity.setGridId(gridScoreDTO.getGridId()); + GridScoreEntity gridScoreEntity = ConvertUtils.sourceToTarget(gridScoreDTO, GridScoreEntity.class); gridScoreEntity.setIsTotal(NumConstant.ONE_STR); gridScoreEntity.setIndexCode(indexCode); - gridScoreEntity.setAgencyId(gridScoreDTO.getAgencyId()); - gridScoreEntity.setAllParentIds(gridScoreDTO.getAllParentIds()); - gridScoreEntity.setQuarterId(gridScoreDTO.getQuarterId()); - gridScoreEntity.setYearId(gridScoreDTO.getYearId()); - gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); gridScoreEntity.setScore(BigDecimal.ZERO); if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { - logger.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); + log.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); continue; } for (GridScoreDetailDTO gridScoreDetailDTO : gridScoreDTO.getDetailList()) { @@ -565,14 +630,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } } - public static void main(String[] args) { - BigDecimal totalScore = BigDecimal.ZERO; - for (int i = 1; i < 5; i++) { - totalScore = totalScore.add(new BigDecimal("1.00")); - } - System.out.println(totalScore); - } - /** * @param customerId * @return com.epmet.dto.indexcal.CustomerGridInfoDTO diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java new file mode 100644 index 0000000000..229c3059de --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -0,0 +1,428 @@ +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.druid.util.StringUtils; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao; +import com.epmet.dao.evaluationindex.screen.FactIndexGridScoreDao; +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; +import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; +import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; +import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; +import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:34 上午 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommunityService { + + @Autowired + private FactIndexPartyAblityOrgMonthlyDao factIndexPartyAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityOrgMonthlyDao factIndexGovrnAblityOrgMonthlyDao; + @Autowired + private FactIndexServiceAblityOrgMonthlyDao factIndexServiceAblityOrgMonthlyDao; + @Autowired + private IndexGroupDetailService indexGroupDetailService; + @Autowired + private IndexCodeFieldReService indexCodeFieldReService; + @Autowired + private FactIndexCommunityScoreDao factIndexCommunityScoreDao; + @Autowired + private FactIndexGridScoreDao factIndexGridScoreDao; + + /** + * @param customerId + * @Description 社区名义发文数量计算【党建能力】 + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityPartyCalculate(String customerId, String monthId) { + // 党建能力 + // 根据all_parent_index_code 获取指标明细 + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + //下属所有网格的党建能力平均值 + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(customerId, monthId); + if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { + log.error("查询下属所有网格的党建能力平均值集合为空"); + return; + }else if (subGridPartyAvgScore.size() == NumConstant.ONE){ + sizeOne(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (subGridPartyAvgScore.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexEnd = NumConstant.TEN; + List> partition = ListUtils.partition(subGridPartyAvgScore, indexEnd); + partition.forEach(publish -> { + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 社区名义发文数量 + List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(mapList)) { + log.error("查询社区名义发文数量集合为空"); + return; + } + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + }else if (mapList.size() == NumConstant.ONE){ + sizeOne(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (mapList.size() > NumConstant.ONE) { + List decimalList = mapList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> publishArticleList = ListUtils.partition(mapList, 10); + publishArticleList.forEach(publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区治理能力 + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityGovernAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridGovernAvgScore(customerId, monthId); + if (subGridGovernAvg.size() == NumConstant.ONE) { + sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (subGridGovernAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(subGridGovernAvg, 10); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 治理能力的六个五级指标 + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityGovernAbility)){ + log.error("查询治理能力的六个五级指标集合为空"); + return; + }else if (communityGovernAbility.size() == NumConstant.ONE) { + sizeOne(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (communityGovernAbility.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> governAbilityList = ListUtils.partition(communityGovernAbility, 10); + governAbilityList.forEach(governAbility -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + governAbility.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区服务能力 + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityServiceAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + String indexCode = detail.getIndexCode(); + if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); + if (subGridServiceAvg.size() == NumConstant.ONE) { + sizeOne(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId().toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (subGridServiceAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10); + serviceAvgList.forEach(serviceAvg -> { + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + serviceAvg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } else { + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityActivityCountList)) { + log.error("查询社区活动组织次数集合为空"); + return; + }else if (communityActivityCountList.size() == NumConstant.ONE) { + sizeOne(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (communityActivityCountList.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> communityActivityList = ListUtils.partition(communityActivityCountList, 10); + communityActivityList.forEach(communityActivity -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + communityActivity.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.FU_WU_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区相关计算 + * @author zxc + * @date 2020/9/1 9:21 上午 + */ + public Boolean communityRelate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List
+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; + +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface AgencyScoreService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-09-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-09-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return AgencyScoreDTO + * @author generator + * @date 2020-09-02 + */ + AgencyScoreDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void save(AgencyScoreDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-09-02 + */ + void update(AgencyScoreDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-09-02 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java similarity index 87% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java index d65f6d43db..3cd66eccf5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/CpcIndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/CpcIndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.indexcal.CalculateCommonFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java new file mode 100644 index 0000000000..afb6bc40bc --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/DeptScoreService.java @@ -0,0 +1,39 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface DeptScoreService extends BaseService { + /** + * @return java.lang.Boolean + * @param formDTO + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java index 6648205d5c..14d2ac604c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java @@ -1,6 +1,5 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; -import com.epmet.commons.tools.utils.Result; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java new file mode 100644 index 0000000000..09d344dd47 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java @@ -0,0 +1,17 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:33 上午 + */ +public interface IndexCalculateCommunityService { + + /** + * @Description 计算社区相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/1 4:12 下午 + */ + Boolean calCommunityAll(String customerId, String monthId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java similarity index 73% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java index 70c49c77fe..a1ab0ad1bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.screen.form.IndexCalculateForm; @@ -10,7 +10,7 @@ import com.epmet.dto.screen.form.IndexCalculateForm; */ public interface IndexCalculateService { /** - * desc:计算党员相关指标 + * desc:按照客户计算所有指标(按照月份) * @param formDTO * @return */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java new file mode 100644 index 0000000000..c27b6db508 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java @@ -0,0 +1,18 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/9/2 3:11 下午 + */ +public interface IndexCalculateStreetService { + + /** + * @Description 计算街道相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/2 3:12 下午 + */ + Boolean calStreetAll(String customerId, String monthId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java index e54f182903..d2804d1dec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java new file mode 100644 index 0000000000..17f56e6895 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; +import com.epmet.service.evaluationindex.indexcal.AgencyScoreService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class AgencyScoreServiceImpl extends BaseServiceImpl implements AgencyScoreService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, AgencyScoreDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, AgencyScoreDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public AgencyScoreDTO get(String id) { + AgencyScoreEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, AgencyScoreDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index c2d8a924cb..7876c2158e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,20 +1,23 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.screen.IndexCodeFieldReDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dao.evaluationindex.screen.IndexCodeFieldReDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.entity.indexscore.CpcScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.CpcIndexCalculateService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; +import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; import com.epmet.support.normalizing.BigDecimalScoreCalculator; import com.epmet.support.normalizing.Correlation; import com.epmet.support.normalizing.ScoreCalculator; @@ -35,6 +38,7 @@ import java.util.stream.Collectors; @Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; @@ -83,38 +87,35 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { if (totalEntity == null) { totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); totalEntity.setIsTotal(NumConstant.ONE_STR); - totalEntity.setIndexCode(indexGroupDetailEntity.getIndexCode()); + totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); totalEntity.setScore(new BigDecimal(0)); cpcScoreTotalMap.put(userId, totalEntity); } - //todo 自建群活跃度——议题转项目率 有阈值 >60%按60%算 + //自建群活跃度——议题转项目率 有阈值 >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)); } }); - insertBatch(cpcScoreTotalMap.values().stream().collect(Collectors.toList())); + deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(),cpcScoreTotalMap.values().stream().collect(Collectors.toList())); } - private void insertBatch(Collection values) { + private void deleteAndInsertBatch(String customerId, String monthId, String indexCode, Collection values) { + cpcScoreDao.deleteByMonthId(customerId, monthId, indexCode); cpcScoreDao.insertBatch(values); } private void calculatePartScore(CalculateCommonFormDTO formDTO) { - Map indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); - if (CollectionUtils.isEmpty(indexCodeFieldReList)) { - log.error("cpcIndexCalculate have any indexcodefieldre"); - return; - } //计算最大最小值 Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.error("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); - return; + throw new RenException("指标原始数据记录不存在"); } //指标集合 Map> groupIndexDetailsMap = getIndexDetailMap(formDTO); if (groupIndexDetailsMap == null) { + log.error("calculatePartScore"); return; } @@ -152,7 +153,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { IndexInputVO value = entry.getValue(); String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); if (StringUtils.isBlank(fieldName)) { - log.error("cpcIndexCalculate fieldName error"); + log.error("calculateScore indexCode:{} get fieldName return blank", indexCode); continue; } @@ -179,11 +180,15 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { value.getIndexValueVOs().add(currentUserIndexValue); } } - log.warn("计算的参数:{}", indexMap); + log.info("计算的参数:{}", JSON.toJSONString(indexMap)); HashMap result = calculateScore(indexMap); - log.warn("计算的结果:{}", result); + log.info("计算的结果:{}", result); //处理结果 + if (CollectionUtils.isEmpty(result)){ + log.error("calculateScore calculateScore return empty"); + return; + } saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); } @@ -197,14 +202,14 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { */ @Transactional(rollbackFor = Exception.class) public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); + List list = new ArrayList<>(); result.forEach((userId, score) -> { CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); cpcScoreEntity.setScore(score); list.add(cpcScoreEntity); }); - this.insertBatch(list); + this.deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),parentIndexCode,list); } @@ -226,13 +231,20 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); + if (StringUtils.isBlank(fieldName)) { + continue; + } //最小值key String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); //最大值key String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); - minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); - + minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); + //如果最大值超过阈值 则最大值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(new BigDecimal(NumConstant.ONE_NEG)) == NumConstant.ONE){ + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -240,7 +252,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(),new ArrayList<>(),index.getThreshold(),index.getWeight(),scoreCalculator); + IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO); } return map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java new file mode 100644 index 0000000000..d999757956 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.DeptScoreService; +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.util.List; + + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Slf4j +@Service +public class DeptScoreServiceImpl extends BaseServiceImpl implements DeptScoreService { + @Autowired + private IndexGroupDetailService getDetailListByParentCode; + @Autowired + private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; + + /** + * @param formDTO + * @return java.lang.Boolean + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + @Override + public Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO) { + //获取指标权重 + List parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.QU_ZHI_BU_MEN.getCode(), + IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(parentIndexDetails)) { + log.warn("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【区直部门:治理能力】指标权重信息不存在"); + } + log.info(JSON.toJSONString(parentIndexDetails)); + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java similarity index 75% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 7fa8281f15..306c3c7713 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,29 +1,38 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.indexscore.GridScoreDao; -import com.epmet.dao.screen.ScreenCustomerGridDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.*; -import com.epmet.entity.indexscore.GridScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.GridCorreLationService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; -import com.epmet.support.normalizing.*; -import com.epmet.support.normalizing.batch.*; +import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.IndexOutputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -40,9 +49,10 @@ import java.util.stream.Collectors; * @author yinzuomei@elink-cn.com * @date 2020/8/26 10:35 */ +@Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class GridCorreLationServiceImpl implements GridCorreLationService { - private Logger logger = LogManager.getLogger(GridCorreLationServiceImpl.class); @Autowired private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; @Autowired @@ -76,36 +86,33 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(dangJianNengLiList)) { - logger.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:党建能力】指标权重信息不存在"); } calculateGridDangJian(formDTO, dangJianNengLiList); - //2、计算网格相关-治理能力 List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(zhiLiNengLiList)) { - logger.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); } calculateGridZhiLi(formDTO, zhiLiNengLiList); - //3、计算网格相关-服务能力 List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(fuWuNengLiList)) { - logger.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); } calculateGridFuWu(formDTO, fuWuNengLiList); - //4、计算网格相关总分 List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); if (CollectionUtils.isEmpty(wgxgList)) { - logger.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关】指标权重信息不存在"); } calculateGridTotal(formDTO, wgxgList, IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); @@ -127,16 +134,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-党建能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + } else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -155,21 +166,21 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { - //对应的数值 - String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); - //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { + log.info("index_code :{}",key); + if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { //组织内党员的联系群众能力考评分(平均值) - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); //网格内党员的联系群众能力考评分(平均值) String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO, gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); } }); }); @@ -180,6 +191,31 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), NumConstant.ZERO_STR); } + /** + * @param formDTO + * @param indexCode + * @return void + * @author yinzuomei + * @description 只有一条事实记录时,分值默认赋50 + * @Date 2020/9/2 14:35 + **/ + private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) { + List> resultMapList = new ArrayList<>(); + HashMap resultMap = new HashMap<>(); + String gridId =null; + if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexPartyAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.ZHI_LI_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexGovrnAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.FU_WU_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexServiceAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } + resultMap.put(gridId, new BigDecimal(NumConstant.FIFTY_STR)); + resultMapList.add(resultMap); + // 保存中间表 + saveGridCorreLationResult(formDTO, resultMapList, indexCode, NumConstant.ZERO_STR); + } + /** * @param calculateCommonFormDTO * @return java.util.Map @@ -199,6 +235,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + //FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("24.35")); + map.put(StrConstant.MAX, new BigDecimal("46.13"));*/ return map; } @@ -215,6 +254,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("24.43"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("46.13"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("24.35"); + }*/ return result; } @@ -231,6 +279,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("29.40"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("18.30"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("9.15"); + }*/ return result; } @@ -253,6 +310,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + // FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("9.15")); + map.put(StrConstant.MAX, new BigDecimal("29.4"));*/ return map; } @@ -275,7 +335,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { String yearId = DateUtils.getYearId(formDTO.getMonthId()); for (HashMap resultMap : resultMapList) { resultMap.forEach((gridId, partyAblityScore) -> { - logger.info("网格id:" + gridId + ";分值:" + partyAblityScore); + log.info("网格id:" + gridId + ";index_Code:"+indexCode+";分值:" + partyAblityScore); GridScoreEntity gridScoreEntity = new GridScoreEntity(); gridScoreEntity.setCustomerId(formDTO.getCustomerId()); gridScoreEntity.setGridId(gridId); @@ -283,8 +343,12 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setIndexCode(indexCode); ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(formDTO.getCustomerId(), gridId); if (null != screenCustomerGridDTO) { - gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); - gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + if(StringUtils.isNotBlank(screenCustomerGridDTO.getParentAgencyId())){ + gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); + } + if(StringUtils.isNotBlank(screenCustomerGridDTO.getAllParentIds())){ + gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + } } gridScoreEntity.setQuarterId(quarterId); gridScoreEntity.setYearId(yearId); @@ -309,10 +373,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); - logger.info("计算的参数:{}", indexInputVOS); + log.info("计算的参数"+JSON.toJSONString(indexInputVOS)); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + + //如果想看每一个指标的分值调用下面的方法 + List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + log.info("计算的结果(List)"+JSON.toJSONString(listTemp)); + HashMap resultMap = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - logger.info("计算的结果:{}", resultMap); + log.info("计算的结果{}", resultMap); return resultMap; } @@ -344,23 +413,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private Map> buildGridCorrelationIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); for (IndexGroupDetailEntity index : indexList) { -// IndexInputVO indexInputVO = new IndexInputVO(); - // 指标code -// indexInputVO.setIndexId(index.getIndexCode()); - //阈值 -// indexInputVO.setThreshold(index.getThreshold()); - //权重 -// indexInputVO.setWeight(index.getWeight()); BigDecimal minValue = null; BigDecimal maxValue = null; if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { //组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值 - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); Map contactMassesAblityMap = this.getContactMassesAblityMap(formDTO); minValue = contactMassesAblityMap.get(StrConstant.MIN); maxValue = contactMassesAblityMap.get(StrConstant.MAX); } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(index.getIndexCode())) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); Map joinIssueAblityMap = this.getJoinIssueAblityMap(formDTO); minValue = joinIssueAblityMap.get(StrConstant.MIN); maxValue = joinIssueAblityMap.get(StrConstant.MAX); @@ -368,15 +430,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); if (StringUtils.isBlank(fieldName)) { - logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); + log.error("index_code:{} not find field_name",index.getIndexCode()); continue; } - logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); +// log.info("index_code2:{} ,field_name:{}",index.getIndexCode(),fieldName); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); } + //有阈值,且最大值>阈值,则最大值赋值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG_STR).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(index.getThreshold()) == NumConstant.ONE) { + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -384,12 +451,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); -// indexInputVO.setScoreCalculator(scoreCalculator); List> sampleValueList = new ArrayList<>(); -// indexInputVO.setIndexValueVOs(sampleValueList); IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), sampleValueList, index.getThreshold(), +// new BigDecimal("-1"),//FOR TEST index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO1); @@ -409,16 +475,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -437,19 +507,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); + String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); + BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); + SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); + value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); //构造样本值对象 SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); - String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); - BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); - SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); - value.getIndexValueVOs().add(contactMassesAblityValue); } }); }); @@ -471,18 +540,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private void calculateGridFuWu(CalculateCommonFormDTO formDTO, List indexList) { //查询总记录数 - int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); + int total = factIndexServiceAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -501,7 +574,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); @@ -509,7 +581,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); } else { - logger.error("index_code:" + key + " not find field_name"); + log.error("index_code:" + key + " not find field_name"); } }); }); @@ -532,25 +604,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 List gridScoreDTOList = gridScoreDao.selectList(formDTO); if(CollectionUtils.isEmpty(gridScoreDTOList)){ - logger.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); + log.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); throw new RenException("客户一级指标分值记录不存在"); } Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List gridScoreEntityList = new ArrayList<>(); for (GridScoreDTO gridScoreDTO : gridScoreDTOList) { - GridScoreEntity gridScoreEntity = new GridScoreEntity(); - gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); - gridScoreEntity.setGridId(gridScoreDTO.getGridId()); + GridScoreEntity gridScoreEntity = ConvertUtils.sourceToTarget(gridScoreDTO, GridScoreEntity.class); gridScoreEntity.setIsTotal(NumConstant.ONE_STR); gridScoreEntity.setIndexCode(indexCode); - gridScoreEntity.setAgencyId(gridScoreDTO.getAgencyId()); - gridScoreEntity.setAllParentIds(gridScoreDTO.getAllParentIds()); - gridScoreEntity.setQuarterId(gridScoreDTO.getQuarterId()); - gridScoreEntity.setYearId(gridScoreDTO.getYearId()); - gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); gridScoreEntity.setScore(BigDecimal.ZERO); if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { - logger.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); + log.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); continue; } for (GridScoreDetailDTO gridScoreDetailDTO : gridScoreDTO.getDetailList()) { @@ -565,14 +630,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } } - public static void main(String[] args) { - BigDecimal totalScore = BigDecimal.ZERO; - for (int i = 1; i < 5; i++) { - totalScore = totalScore.add(new BigDecimal("1.00")); - } - System.out.println(totalScore); - } - /** * @param customerId * @return com.epmet.dto.indexcal.CustomerGridInfoDTO diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java new file mode 100644 index 0000000000..229c3059de --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -0,0 +1,428 @@ +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.druid.util.StringUtils; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao; +import com.epmet.dao.evaluationindex.screen.FactIndexGridScoreDao; +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; +import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; +import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; +import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; +import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:34 上午 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommunityService { + + @Autowired + private FactIndexPartyAblityOrgMonthlyDao factIndexPartyAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityOrgMonthlyDao factIndexGovrnAblityOrgMonthlyDao; + @Autowired + private FactIndexServiceAblityOrgMonthlyDao factIndexServiceAblityOrgMonthlyDao; + @Autowired + private IndexGroupDetailService indexGroupDetailService; + @Autowired + private IndexCodeFieldReService indexCodeFieldReService; + @Autowired + private FactIndexCommunityScoreDao factIndexCommunityScoreDao; + @Autowired + private FactIndexGridScoreDao factIndexGridScoreDao; + + /** + * @param customerId + * @Description 社区名义发文数量计算【党建能力】 + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityPartyCalculate(String customerId, String monthId) { + // 党建能力 + // 根据all_parent_index_code 获取指标明细 + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + //下属所有网格的党建能力平均值 + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(customerId, monthId); + if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { + log.error("查询下属所有网格的党建能力平均值集合为空"); + return; + }else if (subGridPartyAvgScore.size() == NumConstant.ONE){ + sizeOne(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (subGridPartyAvgScore.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexEnd = NumConstant.TEN; + List> partition = ListUtils.partition(subGridPartyAvgScore, indexEnd); + partition.forEach(publish -> { + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 社区名义发文数量 + List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(mapList)) { + log.error("查询社区名义发文数量集合为空"); + return; + } + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + }else if (mapList.size() == NumConstant.ONE){ + sizeOne(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (mapList.size() > NumConstant.ONE) { + List decimalList = mapList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> publishArticleList = ListUtils.partition(mapList, 10); + publishArticleList.forEach(publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区治理能力 + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityGovernAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridGovernAvgScore(customerId, monthId); + if (subGridGovernAvg.size() == NumConstant.ONE) { + sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (subGridGovernAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(subGridGovernAvg, 10); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 治理能力的六个五级指标 + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityGovernAbility)){ + log.error("查询治理能力的六个五级指标集合为空"); + return; + }else if (communityGovernAbility.size() == NumConstant.ONE) { + sizeOne(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (communityGovernAbility.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> governAbilityList = ListUtils.partition(communityGovernAbility, 10); + governAbilityList.forEach(governAbility -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + governAbility.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区服务能力 + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityServiceAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + String indexCode = detail.getIndexCode(); + if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); + if (subGridServiceAvg.size() == NumConstant.ONE) { + sizeOne(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId().toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (subGridServiceAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10); + serviceAvgList.forEach(serviceAvg -> { + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + serviceAvg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } else { + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityActivityCountList)) { + log.error("查询社区活动组织次数集合为空"); + return; + }else if (communityActivityCountList.size() == NumConstant.ONE) { + sizeOne(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (communityActivityCountList.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> communityActivityList = ListUtils.partition(communityActivityCountList, 10); + communityActivityList.forEach(communityActivity -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + communityActivity.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.FU_WU_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区相关计算 + * @author zxc + * @date 2020/9/1 9:21 上午 + */ + public Boolean communityRelate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List
+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +public interface DeptScoreService extends BaseService { + /** + * @return java.lang.Boolean + * @param formDTO + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java similarity index 93% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java index 6648205d5c..14d2ac604c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/GridCorreLationService.java @@ -1,6 +1,5 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; -import com.epmet.commons.tools.utils.Result; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.dto.indexcal.PageQueryGridFormDTO; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java new file mode 100644 index 0000000000..09d344dd47 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateCommunityService.java @@ -0,0 +1,17 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:33 上午 + */ +public interface IndexCalculateCommunityService { + + /** + * @Description 计算社区相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/1 4:12 下午 + */ + Boolean calCommunityAll(String customerId, String monthId); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java similarity index 73% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java index 70c49c77fe..a1ab0ad1bf 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/screen/IndexCalculateService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateService.java @@ -1,4 +1,4 @@ -package com.epmet.service.screen; +package com.epmet.service.evaluationindex.indexcal; import com.epmet.dto.screen.form.IndexCalculateForm; @@ -10,7 +10,7 @@ import com.epmet.dto.screen.form.IndexCalculateForm; */ public interface IndexCalculateService { /** - * desc:计算党员相关指标 + * desc:按照客户计算所有指标(按照月份) * @param formDTO * @return */ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java new file mode 100644 index 0000000000..c27b6db508 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCalculateStreetService.java @@ -0,0 +1,18 @@ +package com.epmet.service.evaluationindex.indexcal; + +/** + * @Author zxc + * @DateTime 2020/9/2 3:11 下午 + */ +public interface IndexCalculateStreetService { + + /** + * @Description 计算街道相关总分 + * @param customerId + * @param monthId + * @author zxc + * @date 2020/9/2 3:12 下午 + */ + Boolean calStreetAll(String customerId, String monthId); + +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java similarity index 89% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java index e54f182903..d2804d1dec 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/IndexCodeFieldReService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/IndexCodeFieldReService.java @@ -1,4 +1,4 @@ -package com.epmet.service.indexcal; +package com.epmet.service.evaluationindex.indexcal; import java.util.Map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java new file mode 100644 index 0000000000..17f56e6895 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/AgencyScoreServiceImpl.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; +import com.epmet.service.evaluationindex.indexcal.AgencyScoreService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class AgencyScoreServiceImpl extends BaseServiceImpl implements AgencyScoreService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, AgencyScoreDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, AgencyScoreDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public AgencyScoreDTO get(String id) { + AgencyScoreEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, AgencyScoreDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index c2d8a924cb..7876c2158e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,20 +1,23 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.screen.IndexCodeFieldReDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dao.evaluationindex.screen.IndexCodeFieldReDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.entity.indexscore.CpcScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.CpcIndexCalculateService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; +import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; import com.epmet.support.normalizing.BigDecimalScoreCalculator; import com.epmet.support.normalizing.Correlation; import com.epmet.support.normalizing.ScoreCalculator; @@ -35,6 +38,7 @@ import java.util.stream.Collectors; @Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; @@ -83,38 +87,35 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { if (totalEntity == null) { totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); totalEntity.setIsTotal(NumConstant.ONE_STR); - totalEntity.setIndexCode(indexGroupDetailEntity.getIndexCode()); + totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); totalEntity.setScore(new BigDecimal(0)); cpcScoreTotalMap.put(userId, totalEntity); } - //todo 自建群活跃度——议题转项目率 有阈值 >60%按60%算 + //自建群活跃度——议题转项目率 有阈值 >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)); } }); - insertBatch(cpcScoreTotalMap.values().stream().collect(Collectors.toList())); + deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(),cpcScoreTotalMap.values().stream().collect(Collectors.toList())); } - private void insertBatch(Collection values) { + private void deleteAndInsertBatch(String customerId, String monthId, String indexCode, Collection values) { + cpcScoreDao.deleteByMonthId(customerId, monthId, indexCode); cpcScoreDao.insertBatch(values); } private void calculatePartScore(CalculateCommonFormDTO formDTO) { - Map indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); - if (CollectionUtils.isEmpty(indexCodeFieldReList)) { - log.error("cpcIndexCalculate have any indexcodefieldre"); - return; - } //计算最大最小值 Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.error("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); - return; + throw new RenException("指标原始数据记录不存在"); } //指标集合 Map> groupIndexDetailsMap = getIndexDetailMap(formDTO); if (groupIndexDetailsMap == null) { + log.error("calculatePartScore"); return; } @@ -152,7 +153,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { IndexInputVO value = entry.getValue(); String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); if (StringUtils.isBlank(fieldName)) { - log.error("cpcIndexCalculate fieldName error"); + log.error("calculateScore indexCode:{} get fieldName return blank", indexCode); continue; } @@ -179,11 +180,15 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { value.getIndexValueVOs().add(currentUserIndexValue); } } - log.warn("计算的参数:{}", indexMap); + log.info("计算的参数:{}", JSON.toJSONString(indexMap)); HashMap result = calculateScore(indexMap); - log.warn("计算的结果:{}", result); + log.info("计算的结果:{}", result); //处理结果 + if (CollectionUtils.isEmpty(result)){ + log.error("calculateScore calculateScore return empty"); + return; + } saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); } @@ -197,14 +202,14 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { */ @Transactional(rollbackFor = Exception.class) public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); + List list = new ArrayList<>(); result.forEach((userId, score) -> { CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); cpcScoreEntity.setScore(score); list.add(cpcScoreEntity); }); - this.insertBatch(list); + this.deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),parentIndexCode,list); } @@ -226,13 +231,20 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); + if (StringUtils.isBlank(fieldName)) { + continue; + } //最小值key String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); //最大值key String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); - minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); - + minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); + //如果最大值超过阈值 则最大值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(new BigDecimal(NumConstant.ONE_NEG)) == NumConstant.ONE){ + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -240,7 +252,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(),new ArrayList<>(),index.getThreshold(),index.getWeight(),scoreCalculator); + IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO); } return map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java new file mode 100644 index 0000000000..d999757956 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.DeptScoreService; +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.util.List; + + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Slf4j +@Service +public class DeptScoreServiceImpl extends BaseServiceImpl implements DeptScoreService { + @Autowired + private IndexGroupDetailService getDetailListByParentCode; + @Autowired + private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; + + /** + * @param formDTO + * @return java.lang.Boolean + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + @Override + public Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO) { + //获取指标权重 + List parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.QU_ZHI_BU_MEN.getCode(), + IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(parentIndexDetails)) { + log.warn("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【区直部门:治理能力】指标权重信息不存在"); + } + log.info(JSON.toJSONString(parentIndexDetails)); + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java similarity index 75% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 7fa8281f15..306c3c7713 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,29 +1,38 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.indexscore.GridScoreDao; -import com.epmet.dao.screen.ScreenCustomerGridDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.*; -import com.epmet.entity.indexscore.GridScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.GridCorreLationService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; -import com.epmet.support.normalizing.*; -import com.epmet.support.normalizing.batch.*; +import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.IndexOutputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -40,9 +49,10 @@ import java.util.stream.Collectors; * @author yinzuomei@elink-cn.com * @date 2020/8/26 10:35 */ +@Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class GridCorreLationServiceImpl implements GridCorreLationService { - private Logger logger = LogManager.getLogger(GridCorreLationServiceImpl.class); @Autowired private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; @Autowired @@ -76,36 +86,33 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(dangJianNengLiList)) { - logger.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:党建能力】指标权重信息不存在"); } calculateGridDangJian(formDTO, dangJianNengLiList); - //2、计算网格相关-治理能力 List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(zhiLiNengLiList)) { - logger.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); } calculateGridZhiLi(formDTO, zhiLiNengLiList); - //3、计算网格相关-服务能力 List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(fuWuNengLiList)) { - logger.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); } calculateGridFuWu(formDTO, fuWuNengLiList); - //4、计算网格相关总分 List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); if (CollectionUtils.isEmpty(wgxgList)) { - logger.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关】指标权重信息不存在"); } calculateGridTotal(formDTO, wgxgList, IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); @@ -127,16 +134,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-党建能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + } else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -155,21 +166,21 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { - //对应的数值 - String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); - //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { + log.info("index_code :{}",key); + if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { //组织内党员的联系群众能力考评分(平均值) - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); //网格内党员的联系群众能力考评分(平均值) String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO, gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); } }); }); @@ -180,6 +191,31 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), NumConstant.ZERO_STR); } + /** + * @param formDTO + * @param indexCode + * @return void + * @author yinzuomei + * @description 只有一条事实记录时,分值默认赋50 + * @Date 2020/9/2 14:35 + **/ + private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) { + List> resultMapList = new ArrayList<>(); + HashMap resultMap = new HashMap<>(); + String gridId =null; + if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexPartyAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.ZHI_LI_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexGovrnAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.FU_WU_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexServiceAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } + resultMap.put(gridId, new BigDecimal(NumConstant.FIFTY_STR)); + resultMapList.add(resultMap); + // 保存中间表 + saveGridCorreLationResult(formDTO, resultMapList, indexCode, NumConstant.ZERO_STR); + } + /** * @param calculateCommonFormDTO * @return java.util.Map @@ -199,6 +235,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + //FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("24.35")); + map.put(StrConstant.MAX, new BigDecimal("46.13"));*/ return map; } @@ -215,6 +254,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("24.43"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("46.13"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("24.35"); + }*/ return result; } @@ -231,6 +279,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("29.40"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("18.30"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("9.15"); + }*/ return result; } @@ -253,6 +310,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + // FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("9.15")); + map.put(StrConstant.MAX, new BigDecimal("29.4"));*/ return map; } @@ -275,7 +335,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { String yearId = DateUtils.getYearId(formDTO.getMonthId()); for (HashMap resultMap : resultMapList) { resultMap.forEach((gridId, partyAblityScore) -> { - logger.info("网格id:" + gridId + ";分值:" + partyAblityScore); + log.info("网格id:" + gridId + ";index_Code:"+indexCode+";分值:" + partyAblityScore); GridScoreEntity gridScoreEntity = new GridScoreEntity(); gridScoreEntity.setCustomerId(formDTO.getCustomerId()); gridScoreEntity.setGridId(gridId); @@ -283,8 +343,12 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setIndexCode(indexCode); ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(formDTO.getCustomerId(), gridId); if (null != screenCustomerGridDTO) { - gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); - gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + if(StringUtils.isNotBlank(screenCustomerGridDTO.getParentAgencyId())){ + gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); + } + if(StringUtils.isNotBlank(screenCustomerGridDTO.getAllParentIds())){ + gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + } } gridScoreEntity.setQuarterId(quarterId); gridScoreEntity.setYearId(yearId); @@ -309,10 +373,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); - logger.info("计算的参数:{}", indexInputVOS); + log.info("计算的参数"+JSON.toJSONString(indexInputVOS)); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + + //如果想看每一个指标的分值调用下面的方法 + List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + log.info("计算的结果(List)"+JSON.toJSONString(listTemp)); + HashMap resultMap = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - logger.info("计算的结果:{}", resultMap); + log.info("计算的结果{}", resultMap); return resultMap; } @@ -344,23 +413,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private Map> buildGridCorrelationIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); for (IndexGroupDetailEntity index : indexList) { -// IndexInputVO indexInputVO = new IndexInputVO(); - // 指标code -// indexInputVO.setIndexId(index.getIndexCode()); - //阈值 -// indexInputVO.setThreshold(index.getThreshold()); - //权重 -// indexInputVO.setWeight(index.getWeight()); BigDecimal minValue = null; BigDecimal maxValue = null; if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { //组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值 - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); Map contactMassesAblityMap = this.getContactMassesAblityMap(formDTO); minValue = contactMassesAblityMap.get(StrConstant.MIN); maxValue = contactMassesAblityMap.get(StrConstant.MAX); } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(index.getIndexCode())) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); Map joinIssueAblityMap = this.getJoinIssueAblityMap(formDTO); minValue = joinIssueAblityMap.get(StrConstant.MIN); maxValue = joinIssueAblityMap.get(StrConstant.MAX); @@ -368,15 +430,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); if (StringUtils.isBlank(fieldName)) { - logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); + log.error("index_code:{} not find field_name",index.getIndexCode()); continue; } - logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); +// log.info("index_code2:{} ,field_name:{}",index.getIndexCode(),fieldName); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); } + //有阈值,且最大值>阈值,则最大值赋值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG_STR).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(index.getThreshold()) == NumConstant.ONE) { + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -384,12 +451,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); -// indexInputVO.setScoreCalculator(scoreCalculator); List> sampleValueList = new ArrayList<>(); -// indexInputVO.setIndexValueVOs(sampleValueList); IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), sampleValueList, index.getThreshold(), +// new BigDecimal("-1"),//FOR TEST index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO1); @@ -409,16 +475,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -437,19 +507,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); + String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); + BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); + SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); + value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); //构造样本值对象 SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); - String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); - BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); - SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); - value.getIndexValueVOs().add(contactMassesAblityValue); } }); }); @@ -471,18 +540,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private void calculateGridFuWu(CalculateCommonFormDTO formDTO, List indexList) { //查询总记录数 - int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); + int total = factIndexServiceAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -501,7 +574,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); @@ -509,7 +581,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); } else { - logger.error("index_code:" + key + " not find field_name"); + log.error("index_code:" + key + " not find field_name"); } }); }); @@ -532,25 +604,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 List gridScoreDTOList = gridScoreDao.selectList(formDTO); if(CollectionUtils.isEmpty(gridScoreDTOList)){ - logger.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); + log.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); throw new RenException("客户一级指标分值记录不存在"); } Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List gridScoreEntityList = new ArrayList<>(); for (GridScoreDTO gridScoreDTO : gridScoreDTOList) { - GridScoreEntity gridScoreEntity = new GridScoreEntity(); - gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); - gridScoreEntity.setGridId(gridScoreDTO.getGridId()); + GridScoreEntity gridScoreEntity = ConvertUtils.sourceToTarget(gridScoreDTO, GridScoreEntity.class); gridScoreEntity.setIsTotal(NumConstant.ONE_STR); gridScoreEntity.setIndexCode(indexCode); - gridScoreEntity.setAgencyId(gridScoreDTO.getAgencyId()); - gridScoreEntity.setAllParentIds(gridScoreDTO.getAllParentIds()); - gridScoreEntity.setQuarterId(gridScoreDTO.getQuarterId()); - gridScoreEntity.setYearId(gridScoreDTO.getYearId()); - gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); gridScoreEntity.setScore(BigDecimal.ZERO); if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { - logger.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); + log.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); continue; } for (GridScoreDetailDTO gridScoreDetailDTO : gridScoreDTO.getDetailList()) { @@ -565,14 +630,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } } - public static void main(String[] args) { - BigDecimal totalScore = BigDecimal.ZERO; - for (int i = 1; i < 5; i++) { - totalScore = totalScore.add(new BigDecimal("1.00")); - } - System.out.println(totalScore); - } - /** * @param customerId * @return com.epmet.dto.indexcal.CustomerGridInfoDTO diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java new file mode 100644 index 0000000000..229c3059de --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -0,0 +1,428 @@ +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.druid.util.StringUtils; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao; +import com.epmet.dao.evaluationindex.screen.FactIndexGridScoreDao; +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; +import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; +import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; +import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; +import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:34 上午 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommunityService { + + @Autowired + private FactIndexPartyAblityOrgMonthlyDao factIndexPartyAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityOrgMonthlyDao factIndexGovrnAblityOrgMonthlyDao; + @Autowired + private FactIndexServiceAblityOrgMonthlyDao factIndexServiceAblityOrgMonthlyDao; + @Autowired + private IndexGroupDetailService indexGroupDetailService; + @Autowired + private IndexCodeFieldReService indexCodeFieldReService; + @Autowired + private FactIndexCommunityScoreDao factIndexCommunityScoreDao; + @Autowired + private FactIndexGridScoreDao factIndexGridScoreDao; + + /** + * @param customerId + * @Description 社区名义发文数量计算【党建能力】 + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityPartyCalculate(String customerId, String monthId) { + // 党建能力 + // 根据all_parent_index_code 获取指标明细 + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + //下属所有网格的党建能力平均值 + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(customerId, monthId); + if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { + log.error("查询下属所有网格的党建能力平均值集合为空"); + return; + }else if (subGridPartyAvgScore.size() == NumConstant.ONE){ + sizeOne(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (subGridPartyAvgScore.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexEnd = NumConstant.TEN; + List> partition = ListUtils.partition(subGridPartyAvgScore, indexEnd); + partition.forEach(publish -> { + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 社区名义发文数量 + List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(mapList)) { + log.error("查询社区名义发文数量集合为空"); + return; + } + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + }else if (mapList.size() == NumConstant.ONE){ + sizeOne(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (mapList.size() > NumConstant.ONE) { + List decimalList = mapList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> publishArticleList = ListUtils.partition(mapList, 10); + publishArticleList.forEach(publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区治理能力 + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityGovernAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridGovernAvgScore(customerId, monthId); + if (subGridGovernAvg.size() == NumConstant.ONE) { + sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (subGridGovernAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(subGridGovernAvg, 10); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 治理能力的六个五级指标 + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityGovernAbility)){ + log.error("查询治理能力的六个五级指标集合为空"); + return; + }else if (communityGovernAbility.size() == NumConstant.ONE) { + sizeOne(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (communityGovernAbility.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> governAbilityList = ListUtils.partition(communityGovernAbility, 10); + governAbilityList.forEach(governAbility -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + governAbility.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区服务能力 + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityServiceAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + String indexCode = detail.getIndexCode(); + if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); + if (subGridServiceAvg.size() == NumConstant.ONE) { + sizeOne(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId().toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (subGridServiceAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10); + serviceAvgList.forEach(serviceAvg -> { + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + serviceAvg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } else { + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityActivityCountList)) { + log.error("查询社区活动组织次数集合为空"); + return; + }else if (communityActivityCountList.size() == NumConstant.ONE) { + sizeOne(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (communityActivityCountList.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> communityActivityList = ListUtils.partition(communityActivityCountList, 10); + communityActivityList.forEach(communityActivity -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + communityActivity.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.FU_WU_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区相关计算 + * @author zxc + * @date 2020/9/1 9:21 上午 + */ + public Boolean communityRelate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List
+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.dao.evaluationindex.indexcal.AgencyScoreDao; +import com.epmet.dto.indexcal.AgencyScoreDTO; +import com.epmet.entity.evaluationindex.indexcal.AgencyScoreEntity; +import com.epmet.service.evaluationindex.indexcal.AgencyScoreService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 区/街道相关分数表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class AgencyScoreServiceImpl extends BaseServiceImpl implements AgencyScoreService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, AgencyScoreDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, AgencyScoreDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public AgencyScoreDTO get(String id) { + AgencyScoreEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, AgencyScoreDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(AgencyScoreDTO dto) { + AgencyScoreEntity entity = ConvertUtils.sourceToTarget(dto, AgencyScoreEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java similarity index 84% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index c2d8a924cb..7876c2158e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -1,20 +1,23 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexPartyAblityCpcMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.screen.IndexCodeFieldReDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityCpcMonthlyDao; +import com.epmet.dao.evaluationindex.screen.IndexCodeFieldReDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; -import com.epmet.entity.indexscore.CpcScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.CpcScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.CpcIndexCalculateService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; +import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; import com.epmet.support.normalizing.BigDecimalScoreCalculator; import com.epmet.support.normalizing.Correlation; import com.epmet.support.normalizing.ScoreCalculator; @@ -35,6 +38,7 @@ import java.util.stream.Collectors; @Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { @Autowired private FactIndexPartyAblityCpcMonthlyDao factIndexPartyAblityCpcMonthlyDao; @@ -83,38 +87,35 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { if (totalEntity == null) { totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); totalEntity.setIsTotal(NumConstant.ONE_STR); - totalEntity.setIndexCode(indexGroupDetailEntity.getIndexCode()); + totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); totalEntity.setScore(new BigDecimal(0)); cpcScoreTotalMap.put(userId, totalEntity); } - //todo 自建群活跃度——议题转项目率 有阈值 >60%按60%算 + //自建群活跃度——议题转项目率 有阈值 >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)); } }); - insertBatch(cpcScoreTotalMap.values().stream().collect(Collectors.toList())); + deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(),cpcScoreTotalMap.values().stream().collect(Collectors.toList())); } - private void insertBatch(Collection values) { + private void deleteAndInsertBatch(String customerId, String monthId, String indexCode, Collection values) { + cpcScoreDao.deleteByMonthId(customerId, monthId, indexCode); cpcScoreDao.insertBatch(values); } private void calculatePartScore(CalculateCommonFormDTO formDTO) { - Map indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); - if (CollectionUtils.isEmpty(indexCodeFieldReList)) { - log.error("cpcIndexCalculate have any indexcodefieldre"); - return; - } //计算最大最小值 Map minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { log.error("cpcIndexCalculate getExtremeValue customerId:{} have not any fact record", formDTO.getCustomerId()); - return; + throw new RenException("指标原始数据记录不存在"); } //指标集合 Map> groupIndexDetailsMap = getIndexDetailMap(formDTO); if (groupIndexDetailsMap == null) { + log.error("calculatePartScore"); return; } @@ -152,7 +153,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { IndexInputVO value = entry.getValue(); String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(indexCode); if (StringUtils.isBlank(fieldName)) { - log.error("cpcIndexCalculate fieldName error"); + log.error("calculateScore indexCode:{} get fieldName return blank", indexCode); continue; } @@ -179,11 +180,15 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { value.getIndexValueVOs().add(currentUserIndexValue); } } - log.warn("计算的参数:{}", indexMap); + log.info("计算的参数:{}", JSON.toJSONString(indexMap)); HashMap result = calculateScore(indexMap); - log.warn("计算的结果:{}", result); + log.info("计算的结果:{}", result); //处理结果 + if (CollectionUtils.isEmpty(result)){ + log.error("calculateScore calculateScore return empty"); + return; + } saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); } @@ -197,14 +202,14 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { */ @Transactional(rollbackFor = Exception.class) public void saveCpcScore(CalculateCommonFormDTO formDTO, Map indexDetails, String parentIndexCode, HashMap result) { - cpcScoreDao.deleteByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), parentIndexCode); + List list = new ArrayList<>(); result.forEach((userId, score) -> { CpcScoreEntity cpcScoreEntity = indexDetails.get(userId); cpcScoreEntity.setScore(score); list.add(cpcScoreEntity); }); - this.insertBatch(list); + this.deleteAndInsertBatch(formDTO.getCustomerId(),formDTO.getMonthId(),parentIndexCode,list); } @@ -226,13 +231,20 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); + if (StringUtils.isBlank(fieldName)) { + continue; + } //最小值key String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); //最大值key String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); - minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); - + minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); + //如果最大值超过阈值 则最大值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(new BigDecimal(NumConstant.ONE_NEG)) == NumConstant.ONE){ + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -240,7 +252,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); - IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(),new ArrayList<>(),index.getThreshold(),index.getWeight(),scoreCalculator); + IndexInputVO indexInputVO = new IndexInputVO(index.getIndexCode(), new ArrayList<>(), index.getThreshold(), index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO); } return map; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java new file mode 100644 index 0000000000..d999757956 --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.DeptScoreService; +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.util.List; + + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Slf4j +@Service +public class DeptScoreServiceImpl extends BaseServiceImpl implements DeptScoreService { + @Autowired + private IndexGroupDetailService getDetailListByParentCode; + @Autowired + private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; + + /** + * @param formDTO + * @return java.lang.Boolean + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + @Override + public Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO) { + //获取指标权重 + List parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.QU_ZHI_BU_MEN.getCode(), + IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(parentIndexDetails)) { + log.warn("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【区直部门:治理能力】指标权重信息不存在"); + } + log.info(JSON.toJSONString(parentIndexDetails)); + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java similarity index 75% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 7fa8281f15..306c3c7713 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,29 +1,38 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.indexscore.GridScoreDao; -import com.epmet.dao.screen.ScreenCustomerGridDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.*; -import com.epmet.entity.indexscore.GridScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.GridCorreLationService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; -import com.epmet.support.normalizing.*; -import com.epmet.support.normalizing.batch.*; +import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.IndexOutputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -40,9 +49,10 @@ import java.util.stream.Collectors; * @author yinzuomei@elink-cn.com * @date 2020/8/26 10:35 */ +@Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class GridCorreLationServiceImpl implements GridCorreLationService { - private Logger logger = LogManager.getLogger(GridCorreLationServiceImpl.class); @Autowired private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; @Autowired @@ -76,36 +86,33 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(dangJianNengLiList)) { - logger.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:党建能力】指标权重信息不存在"); } calculateGridDangJian(formDTO, dangJianNengLiList); - //2、计算网格相关-治理能力 List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(zhiLiNengLiList)) { - logger.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); } calculateGridZhiLi(formDTO, zhiLiNengLiList); - //3、计算网格相关-服务能力 List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(fuWuNengLiList)) { - logger.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); } calculateGridFuWu(formDTO, fuWuNengLiList); - //4、计算网格相关总分 List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); if (CollectionUtils.isEmpty(wgxgList)) { - logger.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关】指标权重信息不存在"); } calculateGridTotal(formDTO, wgxgList, IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); @@ -127,16 +134,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-党建能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + } else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -155,21 +166,21 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { - //对应的数值 - String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); - //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { + log.info("index_code :{}",key); + if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { //组织内党员的联系群众能力考评分(平均值) - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); //网格内党员的联系群众能力考评分(平均值) String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO, gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); } }); }); @@ -180,6 +191,31 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), NumConstant.ZERO_STR); } + /** + * @param formDTO + * @param indexCode + * @return void + * @author yinzuomei + * @description 只有一条事实记录时,分值默认赋50 + * @Date 2020/9/2 14:35 + **/ + private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) { + List> resultMapList = new ArrayList<>(); + HashMap resultMap = new HashMap<>(); + String gridId =null; + if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexPartyAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.ZHI_LI_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexGovrnAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.FU_WU_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexServiceAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } + resultMap.put(gridId, new BigDecimal(NumConstant.FIFTY_STR)); + resultMapList.add(resultMap); + // 保存中间表 + saveGridCorreLationResult(formDTO, resultMapList, indexCode, NumConstant.ZERO_STR); + } + /** * @param calculateCommonFormDTO * @return java.util.Map @@ -199,6 +235,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + //FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("24.35")); + map.put(StrConstant.MAX, new BigDecimal("46.13"));*/ return map; } @@ -215,6 +254,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("24.43"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("46.13"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("24.35"); + }*/ return result; } @@ -231,6 +279,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("29.40"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("18.30"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("9.15"); + }*/ return result; } @@ -253,6 +310,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + // FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("9.15")); + map.put(StrConstant.MAX, new BigDecimal("29.4"));*/ return map; } @@ -275,7 +335,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { String yearId = DateUtils.getYearId(formDTO.getMonthId()); for (HashMap resultMap : resultMapList) { resultMap.forEach((gridId, partyAblityScore) -> { - logger.info("网格id:" + gridId + ";分值:" + partyAblityScore); + log.info("网格id:" + gridId + ";index_Code:"+indexCode+";分值:" + partyAblityScore); GridScoreEntity gridScoreEntity = new GridScoreEntity(); gridScoreEntity.setCustomerId(formDTO.getCustomerId()); gridScoreEntity.setGridId(gridId); @@ -283,8 +343,12 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setIndexCode(indexCode); ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(formDTO.getCustomerId(), gridId); if (null != screenCustomerGridDTO) { - gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); - gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + if(StringUtils.isNotBlank(screenCustomerGridDTO.getParentAgencyId())){ + gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); + } + if(StringUtils.isNotBlank(screenCustomerGridDTO.getAllParentIds())){ + gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + } } gridScoreEntity.setQuarterId(quarterId); gridScoreEntity.setYearId(yearId); @@ -309,10 +373,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); - logger.info("计算的参数:{}", indexInputVOS); + log.info("计算的参数"+JSON.toJSONString(indexInputVOS)); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + + //如果想看每一个指标的分值调用下面的方法 + List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + log.info("计算的结果(List)"+JSON.toJSONString(listTemp)); + HashMap resultMap = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - logger.info("计算的结果:{}", resultMap); + log.info("计算的结果{}", resultMap); return resultMap; } @@ -344,23 +413,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private Map> buildGridCorrelationIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); for (IndexGroupDetailEntity index : indexList) { -// IndexInputVO indexInputVO = new IndexInputVO(); - // 指标code -// indexInputVO.setIndexId(index.getIndexCode()); - //阈值 -// indexInputVO.setThreshold(index.getThreshold()); - //权重 -// indexInputVO.setWeight(index.getWeight()); BigDecimal minValue = null; BigDecimal maxValue = null; if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { //组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值 - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); Map contactMassesAblityMap = this.getContactMassesAblityMap(formDTO); minValue = contactMassesAblityMap.get(StrConstant.MIN); maxValue = contactMassesAblityMap.get(StrConstant.MAX); } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(index.getIndexCode())) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); Map joinIssueAblityMap = this.getJoinIssueAblityMap(formDTO); minValue = joinIssueAblityMap.get(StrConstant.MIN); maxValue = joinIssueAblityMap.get(StrConstant.MAX); @@ -368,15 +430,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); if (StringUtils.isBlank(fieldName)) { - logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); + log.error("index_code:{} not find field_name",index.getIndexCode()); continue; } - logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); +// log.info("index_code2:{} ,field_name:{}",index.getIndexCode(),fieldName); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); } + //有阈值,且最大值>阈值,则最大值赋值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG_STR).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(index.getThreshold()) == NumConstant.ONE) { + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -384,12 +451,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); -// indexInputVO.setScoreCalculator(scoreCalculator); List> sampleValueList = new ArrayList<>(); -// indexInputVO.setIndexValueVOs(sampleValueList); IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), sampleValueList, index.getThreshold(), +// new BigDecimal("-1"),//FOR TEST index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO1); @@ -409,16 +475,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -437,19 +507,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); + String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); + BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); + SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); + value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); //构造样本值对象 SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); - String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); - BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); - SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); - value.getIndexValueVOs().add(contactMassesAblityValue); } }); }); @@ -471,18 +540,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private void calculateGridFuWu(CalculateCommonFormDTO formDTO, List indexList) { //查询总记录数 - int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); + int total = factIndexServiceAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -501,7 +574,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); @@ -509,7 +581,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); } else { - logger.error("index_code:" + key + " not find field_name"); + log.error("index_code:" + key + " not find field_name"); } }); }); @@ -532,25 +604,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 List gridScoreDTOList = gridScoreDao.selectList(formDTO); if(CollectionUtils.isEmpty(gridScoreDTOList)){ - logger.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); + log.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); throw new RenException("客户一级指标分值记录不存在"); } Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List gridScoreEntityList = new ArrayList<>(); for (GridScoreDTO gridScoreDTO : gridScoreDTOList) { - GridScoreEntity gridScoreEntity = new GridScoreEntity(); - gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); - gridScoreEntity.setGridId(gridScoreDTO.getGridId()); + GridScoreEntity gridScoreEntity = ConvertUtils.sourceToTarget(gridScoreDTO, GridScoreEntity.class); gridScoreEntity.setIsTotal(NumConstant.ONE_STR); gridScoreEntity.setIndexCode(indexCode); - gridScoreEntity.setAgencyId(gridScoreDTO.getAgencyId()); - gridScoreEntity.setAllParentIds(gridScoreDTO.getAllParentIds()); - gridScoreEntity.setQuarterId(gridScoreDTO.getQuarterId()); - gridScoreEntity.setYearId(gridScoreDTO.getYearId()); - gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); gridScoreEntity.setScore(BigDecimal.ZERO); if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { - logger.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); + log.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); continue; } for (GridScoreDetailDTO gridScoreDetailDTO : gridScoreDTO.getDetailList()) { @@ -565,14 +630,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } } - public static void main(String[] args) { - BigDecimal totalScore = BigDecimal.ZERO; - for (int i = 1; i < 5; i++) { - totalScore = totalScore.add(new BigDecimal("1.00")); - } - System.out.println(totalScore); - } - /** * @param customerId * @return com.epmet.dto.indexcal.CustomerGridInfoDTO diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java new file mode 100644 index 0000000000..229c3059de --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -0,0 +1,428 @@ +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.druid.util.StringUtils; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao; +import com.epmet.dao.evaluationindex.screen.FactIndexGridScoreDao; +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; +import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; +import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; +import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; +import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:34 上午 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommunityService { + + @Autowired + private FactIndexPartyAblityOrgMonthlyDao factIndexPartyAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityOrgMonthlyDao factIndexGovrnAblityOrgMonthlyDao; + @Autowired + private FactIndexServiceAblityOrgMonthlyDao factIndexServiceAblityOrgMonthlyDao; + @Autowired + private IndexGroupDetailService indexGroupDetailService; + @Autowired + private IndexCodeFieldReService indexCodeFieldReService; + @Autowired + private FactIndexCommunityScoreDao factIndexCommunityScoreDao; + @Autowired + private FactIndexGridScoreDao factIndexGridScoreDao; + + /** + * @param customerId + * @Description 社区名义发文数量计算【党建能力】 + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityPartyCalculate(String customerId, String monthId) { + // 党建能力 + // 根据all_parent_index_code 获取指标明细 + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + //下属所有网格的党建能力平均值 + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(customerId, monthId); + if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { + log.error("查询下属所有网格的党建能力平均值集合为空"); + return; + }else if (subGridPartyAvgScore.size() == NumConstant.ONE){ + sizeOne(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (subGridPartyAvgScore.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexEnd = NumConstant.TEN; + List> partition = ListUtils.partition(subGridPartyAvgScore, indexEnd); + partition.forEach(publish -> { + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 社区名义发文数量 + List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(mapList)) { + log.error("查询社区名义发文数量集合为空"); + return; + } + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + }else if (mapList.size() == NumConstant.ONE){ + sizeOne(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (mapList.size() > NumConstant.ONE) { + List decimalList = mapList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> publishArticleList = ListUtils.partition(mapList, 10); + publishArticleList.forEach(publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区治理能力 + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityGovernAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridGovernAvgScore(customerId, monthId); + if (subGridGovernAvg.size() == NumConstant.ONE) { + sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (subGridGovernAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(subGridGovernAvg, 10); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 治理能力的六个五级指标 + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityGovernAbility)){ + log.error("查询治理能力的六个五级指标集合为空"); + return; + }else if (communityGovernAbility.size() == NumConstant.ONE) { + sizeOne(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (communityGovernAbility.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> governAbilityList = ListUtils.partition(communityGovernAbility, 10); + governAbilityList.forEach(governAbility -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + governAbility.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区服务能力 + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityServiceAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + String indexCode = detail.getIndexCode(); + if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); + if (subGridServiceAvg.size() == NumConstant.ONE) { + sizeOne(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId().toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (subGridServiceAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10); + serviceAvgList.forEach(serviceAvg -> { + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + serviceAvg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } else { + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityActivityCountList)) { + log.error("查询社区活动组织次数集合为空"); + return; + }else if (communityActivityCountList.size() == NumConstant.ONE) { + sizeOne(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (communityActivityCountList.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> communityActivityList = ListUtils.partition(communityActivityCountList, 10); + communityActivityList.forEach(communityActivity -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + communityActivity.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.FU_WU_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区相关计算 + * @author zxc + * @date 2020/9/1 9:21 上午 + */ + public Boolean communityRelate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List
+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.fastjson.JSON; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; +import com.epmet.dto.indexcal.CalculateCommonFormDTO; +import com.epmet.entity.evaluationindex.indexcal.DeptScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.DeptScoreService; +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.util.List; + + +/** + * 区直部门分值表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-09-02 + */ +@Slf4j +@Service +public class DeptScoreServiceImpl extends BaseServiceImpl implements DeptScoreService { + @Autowired + private IndexGroupDetailService getDetailListByParentCode; + @Autowired + private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; + + /** + * @param formDTO + * @return java.lang.Boolean + * @author yinzuomei + * @description 区直部门,分值计算 + * @Date 2020/8/26 10:51 + **/ + @Override + public Boolean calculateDeptCorreLation(CalculateCommonFormDTO formDTO) { + //获取指标权重 + List parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.QU_ZHI_BU_MEN.getCode(), + IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(parentIndexDetails)) { + log.warn("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【区直部门:治理能力】指标权重信息不存在"); + } + log.info(JSON.toJSONString(parentIndexDetails)); + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java similarity index 75% rename from epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java rename to epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 7fa8281f15..306c3c7713 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,29 +1,38 @@ -package com.epmet.service.indexcal.impl; +package com.epmet.service.evaluationindex.indexcal.impl; +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.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; -import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; -import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao; -import com.epmet.dao.indexscore.CpcScoreDao; -import com.epmet.dao.indexscore.GridScoreDao; -import com.epmet.dao.screen.ScreenCustomerGridDao; +import com.epmet.dao.evaluationindex.indexcal.CpcScoreDao; +import com.epmet.dao.evaluationindex.indexcal.GridScoreDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; +import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.dto.ScreenCustomerGridDTO; import com.epmet.dto.indexcal.*; -import com.epmet.entity.indexscore.GridScoreEntity; -import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.entity.evaluationindex.indexcal.GridScoreEntity; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; import com.epmet.eum.IndexCodeEnum; -import com.epmet.service.indexcal.GridCorreLationService; -import com.epmet.service.indexcal.IndexCodeFieldReService; -import com.epmet.service.screen.IndexGroupDetailService; -import com.epmet.support.normalizing.*; -import com.epmet.support.normalizing.batch.*; +import com.epmet.service.evaluationindex.indexcal.GridCorreLationService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.IndexOutputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -40,9 +49,10 @@ import java.util.stream.Collectors; * @author yinzuomei@elink-cn.com * @date 2020/8/26 10:35 */ +@Slf4j @Service +@DataSource(DataSourceConstant.EVALUATION_INDEX) public class GridCorreLationServiceImpl implements GridCorreLationService { - private Logger logger = LogManager.getLogger(GridCorreLationServiceImpl.class); @Autowired private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; @Autowired @@ -76,36 +86,33 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); if (CollectionUtils.isEmpty(dangJianNengLiList)) { - logger.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:党建能力】指标权重信息不存在"); } calculateGridDangJian(formDTO, dangJianNengLiList); - //2、计算网格相关-治理能力 List zhiLiNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(zhiLiNengLiList)) { - logger.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:治理能力】指标权重信息不存在"); } calculateGridZhiLi(formDTO, zhiLiNengLiList); - //3、计算网格相关-服务能力 List fuWuNengLiList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); if (CollectionUtils.isEmpty(fuWuNengLiList)) { - logger.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关:服务能力】指标权重信息不存在"); } calculateGridFuWu(formDTO, fuWuNengLiList); - //4、计算网格相关总分 List wgxgList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); if (CollectionUtils.isEmpty(wgxgList)) { - logger.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); throw new RenException("客户【网格相关】指标权重信息不存在"); } calculateGridTotal(formDTO, wgxgList, IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode()); @@ -127,16 +134,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-党建能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + } else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -155,21 +166,21 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { - //对应的数值 - String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); - //构造样本值对象 - SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); - value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { + log.info("index_code :{}",key); + if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(key)) { //组织内党员的联系群众能力考评分(平均值) - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); //网格内党员的联系群众能力考评分(平均值) String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); BigDecimal contactMassesAvgValue = getGridContactMassesAvgValue(formDTO, gridId); SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), contactMassesAvgValue); value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + //对应的数值 + String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); + //构造样本值对象 + SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); + value.getIndexValueVOs().add(currentGridIndexValue); } }); }); @@ -180,6 +191,31 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { saveGridCorreLationResult(formDTO, resultMapList, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), NumConstant.ZERO_STR); } + /** + * @param formDTO + * @param indexCode + * @return void + * @author yinzuomei + * @description 只有一条事实记录时,分值默认赋50 + * @Date 2020/9/2 14:35 + **/ + private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) { + List> resultMapList = new ArrayList<>(); + HashMap resultMap = new HashMap<>(); + String gridId =null; + if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexPartyAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.ZHI_LI_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexGovrnAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } else if (IndexCodeEnum.FU_WU_NENG_LI.getCode().equals(indexCode)) { + gridId = factIndexServiceAblityGridMonthlyDao.selectTheOneGrid(formDTO); + } + resultMap.put(gridId, new BigDecimal(NumConstant.FIFTY_STR)); + resultMapList.add(resultMap); + // 保存中间表 + saveGridCorreLationResult(formDTO, resultMapList, indexCode, NumConstant.ZERO_STR); + } + /** * @param calculateCommonFormDTO * @return java.util.Map @@ -199,6 +235,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + //FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("24.35")); + map.put(StrConstant.MAX, new BigDecimal("46.13"));*/ return map; } @@ -215,6 +254,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("24.43"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("46.13"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("24.35"); + }*/ return result; } @@ -231,6 +279,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { if (null == result) { return new BigDecimal(NumConstant.ZERO_STR); } + //FOR TEST + /*BigDecimal result=null; + if(IndexCalConstant.S1_C1_G1.equals(gridId)){ + result= new BigDecimal("29.40"); + }else if(IndexCalConstant.S1_C1_G2.equals(gridId)){ + result=new BigDecimal("18.30"); + }else if(IndexCalConstant.S1_C2_G1.equals(gridId)){ + result=new BigDecimal("9.15"); + }*/ return result; } @@ -253,6 +310,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } map.put(StrConstant.MIN, new BigDecimal(NumConstant.ZERO_STR)); map.put(StrConstant.MAX, new BigDecimal(NumConstant.ZERO_STR)); + // FOR TEST + /*map.put(StrConstant.MIN, new BigDecimal("9.15")); + map.put(StrConstant.MAX, new BigDecimal("29.4"));*/ return map; } @@ -275,7 +335,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { String yearId = DateUtils.getYearId(formDTO.getMonthId()); for (HashMap resultMap : resultMapList) { resultMap.forEach((gridId, partyAblityScore) -> { - logger.info("网格id:" + gridId + ";分值:" + partyAblityScore); + log.info("网格id:" + gridId + ";index_Code:"+indexCode+";分值:" + partyAblityScore); GridScoreEntity gridScoreEntity = new GridScoreEntity(); gridScoreEntity.setCustomerId(formDTO.getCustomerId()); gridScoreEntity.setGridId(gridId); @@ -283,8 +343,12 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { gridScoreEntity.setIndexCode(indexCode); ScreenCustomerGridDTO screenCustomerGridDTO = screenCustomerGridDao.selectParentAgencyId(formDTO.getCustomerId(), gridId); if (null != screenCustomerGridDTO) { - gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); - gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + if(StringUtils.isNotBlank(screenCustomerGridDTO.getParentAgencyId())){ + gridScoreEntity.setAgencyId(screenCustomerGridDTO.getParentAgencyId()); + } + if(StringUtils.isNotBlank(screenCustomerGridDTO.getAllParentIds())){ + gridScoreEntity.setAllParentIds(screenCustomerGridDTO.getAllParentIds()); + } } gridScoreEntity.setQuarterId(quarterId); gridScoreEntity.setYearId(yearId); @@ -309,10 +373,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private HashMap calculate(Map> indexMap) { //构造入参 List indexInputVOS = this.getIndexInputVOList(indexMap); - logger.info("计算的参数:{}", indexInputVOS); + log.info("计算的参数"+JSON.toJSONString(indexInputVOS)); BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + + //如果想看每一个指标的分值调用下面的方法 + List listTemp=batchScoreCalculator.getScoreDetailOfIndexId(indexInputVOS); + log.info("计算的结果(List)"+JSON.toJSONString(listTemp)); + HashMap resultMap = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); - logger.info("计算的结果:{}", resultMap); + log.info("计算的结果{}", resultMap); return resultMap; } @@ -344,23 +413,16 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { private Map> buildGridCorrelationIndexInputVO(CalculateCommonFormDTO formDTO, List indexList, Map minAndMaxMap) { Map> map = new HashMap<>(); for (IndexGroupDetailEntity index : indexList) { -// IndexInputVO indexInputVO = new IndexInputVO(); - // 指标code -// indexInputVO.setIndexId(index.getIndexCode()); - //阈值 -// indexInputVO.setThreshold(index.getThreshold()); - //权重 -// indexInputVO.setWeight(index.getWeight()); BigDecimal minValue = null; BigDecimal maxValue = null; if (IndexCodeEnum.ZUZHINEIDANGYDLXQZNLKPFPJZ.getCode().equals(index.getIndexCode())) { //组织内党员的联系群众能力考评分(平均值) 获取最大值,最小值 - logger.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); +// log.info("组织内党员的联系群众能力考评分(平均值) 单独处理"); Map contactMassesAblityMap = this.getContactMassesAblityMap(formDTO); minValue = contactMassesAblityMap.get(StrConstant.MIN); maxValue = contactMassesAblityMap.get(StrConstant.MAX); } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(index.getIndexCode())) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); Map joinIssueAblityMap = this.getJoinIssueAblityMap(formDTO); minValue = joinIssueAblityMap.get(StrConstant.MIN); maxValue = joinIssueAblityMap.get(StrConstant.MAX); @@ -368,15 +430,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //获取指标对应的列名 String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode()); if (StringUtils.isBlank(fieldName)) { - logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); + log.error("index_code:{} not find field_name",index.getIndexCode()); continue; } - logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); +// log.info("index_code2:{} ,field_name:{}",index.getIndexCode(),fieldName); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); maxValue = new BigDecimal(String.valueOf(minAndMaxMap.get(maxValueKey))); } + //有阈值,且最大值>阈值,则最大值赋值为阈值 + if (new BigDecimal(NumConstant.ONE_NEG_STR).compareTo(index.getThreshold()) != NumConstant.ZERO + && maxValue.compareTo(index.getThreshold()) == NumConstant.ONE) { + maxValue = index.getThreshold(); + } //分值计算器 ScoreCalculator scoreCalculator = new BigDecimalScoreCalculator(minValue, maxValue, @@ -384,12 +451,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { ScoreConstants.MAX_SCORE, Correlation.getCorrelation(index.getCorrelation()) ); -// indexInputVO.setScoreCalculator(scoreCalculator); List> sampleValueList = new ArrayList<>(); -// indexInputVO.setIndexValueVOs(sampleValueList); IndexInputVO indexInputVO1 = new IndexInputVO(index.getIndexCode(), sampleValueList, index.getThreshold(), +// new BigDecimal("-1"),//FOR TEST index.getWeight(), scoreCalculator); map.put(index.getIndexCode(), indexInputVO1); @@ -409,16 +475,20 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -437,19 +507,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 - if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { + if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { +// log.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); + String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); + BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); + SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); + value.getIndexValueVOs().add(contactMassesAblityValue); + }else if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); //构造样本值对象 SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); - } else if (IndexCodeEnum.ZUZHINEIDANGYDSYYSNLKPFPJZ.getCode().equals(key)) { - logger.info("组织内党员的参与议事能力考评分(平均值) 单独处理"); - String gridId = (String) recordMap.get(IndexCalConstant.GRID_ID); - BigDecimal joinAvgValue = getGridJoinIssueAvgValue(formDTO, gridId); - SampleValue contactMassesAblityValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), joinAvgValue); - value.getIndexValueVOs().add(contactMassesAblityValue); } }); }); @@ -471,18 +540,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { **/ private void calculateGridFuWu(CalculateCommonFormDTO formDTO, List indexList) { //查询总记录数 - int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); + int total = factIndexServiceAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; + }else if (NumConstant.ONE == total) { + //只有一个网格时 + log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); + this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode()); } //总页数,进行批量查询,批量计算 int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); - logger.info(String.format("共%s条数据,分%s次计算", total, totalPage)); + log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); //每一组指标的最大值,key:code_MIN/MAX Map minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId()); if (CollectionUtils.isEmpty(minAndMaxMap)) { - logger.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); + log.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId()); return; } //指标集合 @@ -501,7 +574,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { - //列名不为空 if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 String sampleValueStr = String.valueOf(recordMap.get(indexCodeFieldReService.getFieldNameByIndexCode(key))); @@ -509,7 +581,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { SampleValue currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr)); value.getIndexValueVOs().add(currentGridIndexValue); } else { - logger.error("index_code:" + key + " not find field_name"); + log.error("index_code:" + key + " not find field_name"); } }); }); @@ -532,25 +604,18 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 List gridScoreDTOList = gridScoreDao.selectList(formDTO); if(CollectionUtils.isEmpty(gridScoreDTOList)){ - logger.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); + log.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); throw new RenException("客户一级指标分值记录不存在"); } Map indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity())); List gridScoreEntityList = new ArrayList<>(); for (GridScoreDTO gridScoreDTO : gridScoreDTOList) { - GridScoreEntity gridScoreEntity = new GridScoreEntity(); - gridScoreEntity.setCustomerId(gridScoreDTO.getCustomerId()); - gridScoreEntity.setGridId(gridScoreDTO.getGridId()); + GridScoreEntity gridScoreEntity = ConvertUtils.sourceToTarget(gridScoreDTO, GridScoreEntity.class); gridScoreEntity.setIsTotal(NumConstant.ONE_STR); gridScoreEntity.setIndexCode(indexCode); - gridScoreEntity.setAgencyId(gridScoreDTO.getAgencyId()); - gridScoreEntity.setAllParentIds(gridScoreDTO.getAllParentIds()); - gridScoreEntity.setQuarterId(gridScoreDTO.getQuarterId()); - gridScoreEntity.setYearId(gridScoreDTO.getYearId()); - gridScoreEntity.setMonthId(gridScoreDTO.getMonthId()); gridScoreEntity.setScore(BigDecimal.ZERO); if (!CollectionUtils.isEmpty(gridScoreDTO.getDetailList()) && gridScoreDTO.getDetailList().size() != 3) { - logger.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); + log.error("customerId:" + gridScoreDTO.getCustomerId() + ";gridId:" + gridScoreDTO.getGridId() + ";monthId:" + gridScoreDTO.getMonthId() + "能力值缺失,无法计算总值"); continue; } for (GridScoreDetailDTO gridScoreDetailDTO : gridScoreDTO.getDetailList()) { @@ -565,14 +630,6 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { } } - public static void main(String[] args) { - BigDecimal totalScore = BigDecimal.ZERO; - for (int i = 1; i < 5; i++) { - totalScore = totalScore.add(new BigDecimal("1.00")); - } - System.out.println(totalScore); - } - /** * @param customerId * @return com.epmet.dto.indexcal.CustomerGridInfoDTO diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java new file mode 100644 index 0000000000..229c3059de --- /dev/null +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java @@ -0,0 +1,428 @@ +package com.epmet.service.evaluationindex.indexcal.impl; + +import com.alibaba.druid.util.StringUtils; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; +import com.epmet.constant.IndexCalConstant; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao; +import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao; +import com.epmet.dao.evaluationindex.screen.FactIndexGridScoreDao; +import com.epmet.dto.screen.FactIndexCommunityScoreDTO; +import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO; +import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO; +import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO; +import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO; +import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; +import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService; +import com.epmet.service.evaluationindex.indexcal.IndexCodeFieldReService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import com.epmet.support.normalizing.BigDecimalScoreCalculator; +import com.epmet.support.normalizing.Correlation; +import com.epmet.support.normalizing.ScoreCalculator; +import com.epmet.support.normalizing.ScoreConstants; +import com.epmet.support.normalizing.batch.BatchScoreCalculator; +import com.epmet.support.normalizing.batch.IndexInputVO; +import com.epmet.support.normalizing.batch.SampleValue; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.ListUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Author zxc + * @DateTime 2020/8/26 10:34 上午 + */ +@Service +@Slf4j +@DataSource(DataSourceConstant.EVALUATION_INDEX) +public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommunityService { + + @Autowired + private FactIndexPartyAblityOrgMonthlyDao factIndexPartyAblityOrgMonthlyDao; + @Autowired + private FactIndexGovrnAblityOrgMonthlyDao factIndexGovrnAblityOrgMonthlyDao; + @Autowired + private FactIndexServiceAblityOrgMonthlyDao factIndexServiceAblityOrgMonthlyDao; + @Autowired + private IndexGroupDetailService indexGroupDetailService; + @Autowired + private IndexCodeFieldReService indexCodeFieldReService; + @Autowired + private FactIndexCommunityScoreDao factIndexCommunityScoreDao; + @Autowired + private FactIndexGridScoreDao factIndexGridScoreDao; + + /** + * @param customerId + * @Description 社区名义发文数量计算【党建能力】 + * @author zxc + * @date 2020/8/26 10:46 上午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityPartyCalculate(String customerId, String monthId) { + // 党建能力 + // 根据all_parent_index_code 获取指标明细 + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + //下属所有网格的党建能力平均值 + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridPartyAvgScore(customerId, monthId); + if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { + log.error("查询下属所有网格的党建能力平均值集合为空"); + return; + }else if (subGridPartyAvgScore.size() == NumConstant.ONE){ + sizeOne(subGridPartyAvgScore.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (subGridPartyAvgScore.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList())); + Integer indexEnd = NumConstant.TEN; + List> partition = ListUtils.partition(subGridPartyAvgScore, indexEnd); + partition.forEach(publish -> { + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 社区名义发文数量 + List> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(mapList)) { + log.error("查询社区名义发文数量集合为空"); + return; + } + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + }else if (mapList.size() == NumConstant.ONE){ + sizeOne(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + return; + }else if (mapList.size() > NumConstant.ONE) { + List decimalList = mapList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> publishArticleList = ListUtils.partition(mapList, 10); + publishArticleList.forEach(publish -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + publish.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区治理能力 + * @author zxc + * @date 2020/8/26 1:40 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityGovernAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridGovernAvgScore(customerId, monthId); + if (subGridGovernAvg.size() == NumConstant.ONE) { + sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (subGridGovernAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> governAvg = ListUtils.partition(subGridGovernAvg, 10); + governAvg.forEach(avg -> { + List index1SampleValues = new ArrayList<>(); + avg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc); + indexInputVOS.add(index1VO); + }); + } + } else { + // 治理能力的六个五级指标 + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityGovernAbility)){ + log.error("查询治理能力的六个五级指标集合为空"); + return; + }else if (communityGovernAbility.size() == NumConstant.ONE) { + sizeOne(communityGovernAbility.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + return; + } else if (communityGovernAbility.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityGovernAbility.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> governAbilityList = ListUtils.partition(communityGovernAbility, 10); + governAbilityList.forEach(governAbility -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + governAbility.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.ZHI_LI_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区服务能力 + * @author zxc + * @date 2020/8/31 1:38 下午 + */ + @Transactional(rollbackFor = Exception.class) + public Boolean communityServiceAbilityCalculate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode(), IndexCodeEnum.FU_WU_NENG_LI.getCode()); + if (CollectionUtils.isEmpty(detailListByParentCode)) { + log.error("指标明细查询集合为空"); + return false; + } + List indexInputVOS = new ArrayList<>(); + detailListByParentCode.forEach(detail -> { + String indexCode = detail.getIndexCode(); + if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridServiceAvgScore(customerId, monthId); + if (subGridServiceAvg.size() == NumConstant.ONE) { + sizeOne(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId().toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (subGridServiceAvg.size() > NumConstant.ONE) { + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList())); + List> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10); + serviceAvgList.forEach(serviceAvg -> { + BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + serviceAvg.forEach(c -> { + SampleValue s = new SampleValue(c.getAgencyId(), c.getScore()); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } else { + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + if (CollectionUtils.isEmpty(communityActivityCountList)) { + log.error("查询社区活动组织次数集合为空"); + return; + }else if (communityActivityCountList.size() == NumConstant.ONE) { + sizeOne(communityActivityCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + return; + } else if (communityActivityCountList.size() > NumConstant.ONE) { + String fieldNameByIndexCode = indexCodeFieldReService.getFieldNameByIndexCode(detail.getIndexCode()); + if (StringUtils.isEmpty(fieldNameByIndexCode)) { + log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】"); + return; + } + List decimalList = communityActivityCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList()); + MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList); + List>> communityActivityList = ListUtils.partition(communityActivityCountList, 10); + communityActivityList.forEach(communityActivity -> { + ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE); + List index1SampleValues = new ArrayList<>(); + communityActivity.forEach(c -> { + SampleValue s = new SampleValue((String) c.get(IndexCalConstant.AGENCY_ID), new BigDecimal(String.valueOf(c.get(fieldNameByIndexCode)))); + index1SampleValues.add(s); + }); + IndexInputVO index1VO = new IndexInputVO(detail.getIndexId(), index1SampleValues, detail.getThreshold(), detail.getWeight(), sc1); + indexInputVOS.add(index1VO); + }); + } + } + }); + BatchScoreCalculator batchScoreCalculator = new BatchScoreCalculator(); + HashMap scoreCountOfSampleId = batchScoreCalculator.getScoreCountOfSampleId(indexInputVOS); + List result = getResult(scoreCountOfSampleId, customerId, monthId, NumConstant.ZERO_STR, IndexCodeEnum.FU_WU_NENG_LI.getCode()); + deleteAndInsert(customerId, monthId, IndexCodeEnum.FU_WU_NENG_LI.getCode(), result); + return true; + } + + /** + * @param customerId + * @param monthId + * @Description 社区相关计算 + * @author zxc + * @date 2020/9/1 9:21 上午 + */ + public Boolean communityRelate(String customerId, String monthId) { + List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); + List