diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java index 0435005a88..72a807fa2a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/GridScoreDao.java @@ -77,6 +77,7 @@ public interface GridScoreDao extends BaseDao { * @date 2020/8/28 3:20 下午 */ List selectSubGridAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode); + List selectSubGridAvgScoreNew(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("quarterId")String quarterId,@Param("yearId")String yearId); /** * @Description 所有网格的平均值 @@ -87,6 +88,7 @@ public interface GridScoreDao extends BaseDao { * @date 2021/1/15 上午9:24 */ List selectSubGridAvgScoreByAreaCode(@Param("monthId")String monthId, @Param("indexCode")String indexCode, @Param("areaCode")String areaCode); + List selectSubGridAvgScoreByAreaCodeNew(@Param("monthId")String monthId, @Param("indexCode")String indexCode, @Param("areaCode")String areaCode,@Param("quarterId")String quarterId,@Param("yearId")String yearId); /** * 根据入参查询 网格相关分值记录 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java index 8a879f0ea4..4c628125cb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java @@ -102,6 +102,7 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao> selectPublishArticleCountMapbyAreaCode(@Param("monthId")String monthId,@Param("areaCode")String areaCode); List> selectPublishArticleCountMapbyAreaCodeNotSelf(@Param("monthId")String monthId,@Param("areaCode")String areaCode); + List> selectPublishArticleCountMapbyAreaCodeNotSelfNew(@Param("monthId")String monthId,@Param("areaCode")String areaCode,@Param("quarterId")String quarterId,@Param("yearId")String yearId); /** * 根据组织类型删除数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java index 60f0018c20..15c8bab7e8 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java @@ -93,6 +93,7 @@ public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao> selectActivityCountMapIsKongCun(@Param("monthId")String monthId,@Param("areaCode")String areaCode); List> selectActivityCountMapIsKongCunNew(@Param("monthId")String monthId,@Param("areaCode")String areaCode,@Param("quarterId")String quarterId,@Param("yearId")String yearId); List> selectActivityCountMapExistsSubNotSelf(@Param("monthId")String monthId,@Param("areaCode")String areaCode); + List> selectActivityCountMapExistsSubNotSelfNew(@Param("monthId")String monthId,@Param("areaCode")String areaCode,@Param("quarterId")String quarterId,@Param("yearId")String yearId); /** * 根据组织类型删除数据 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 index 693f02c50d..ccc31c71a4 100644 --- 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 @@ -223,12 +223,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); return true; } + String quarterId = DateUtils.getQuarterId(monthId); + String yearId = DateUtils.getYearId(monthId); List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); //下属所有网格的党建能力平均值 detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { - List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScoreNew(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),quarterId,yearId); if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { log.warn(IndexCalConstant.GRID_PARTY_AVG_NULL); } else { @@ -248,7 +250,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } } else { // 社区名义发文数量 - List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapNew(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL,quarterId,yearId); if (CollectionUtils.isEmpty(publishArticleCountList)) { log.warn(IndexCalConstant.COMMUNITY_PUBLISH_ARTICLE_LIST_NULL); } else { @@ -298,11 +300,13 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); return true; } + String quarterId = DateUtils.getQuarterId(monthId); + String yearId = DateUtils.getYearId(monthId); List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { - List subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScoreNew(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),quarterId,yearId); if (CollectionUtils.isEmpty(subGridGovernAvg)){ log.warn("社区下级治理能力平均分集合为空"); }else{ @@ -322,7 +326,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } } else { // 治理能力的六个五级指标 - List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbility(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityNew(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL,quarterId,yearId); if (CollectionUtils.isEmpty(communityGovernAbility)){ log.warn(IndexCalConstant.COMMUNITY_GOVERN_ABILITY_NULL); }else{ @@ -370,12 +374,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); return true; } + String quarterId = DateUtils.getQuarterId(monthId); + String yearId = DateUtils.getYearId(monthId); List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); detailListByParentCode.forEach(detail -> { String indexCode = detail.getIndexCode(); if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { - List subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode()); + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScoreNew(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),quarterId,yearId); if (CollectionUtils.isEmpty(subGridServiceAvg)) { log.warn("查询社区下级所有网格服务能力得分平均值集合为空"); } else { @@ -394,7 +400,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni }); } } else { - List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL); + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapNew(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL,quarterId,yearId); if (CollectionUtils.isEmpty(communityActivityCountList)) { log.warn(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL); }else{ @@ -604,12 +610,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); return true; } + String quarterId = DateUtils.getQuarterId(form.getMonthId()); + String yearId = DateUtils.getYearId(form.getMonthId()); List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); //下属所有网格的党建能力平均值 detailListByParentCode.forEach(detail -> { if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) { - List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScoreByAreaCode(form.getMonthId(),IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode()); + List subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScoreByAreaCodeNew(form.getMonthId(),IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); if (CollectionUtils.isEmpty(subGridPartyAvgScore)) { log.warn(IndexCalConstant.GRID_PARTY_AVG_NULL); } else { @@ -629,7 +637,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } } else { // 社区名义发文数量 - List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapbyAreaCodeNotSelf( form.getMonthId(),form.getCustomerAreaCode()); + List> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapbyAreaCodeNotSelfNew( form.getMonthId(),form.getCustomerAreaCode(),quarterId,yearId); if (CollectionUtils.isEmpty(publishArticleCountList)) { log.warn(IndexCalConstant.COMMUNITY_PUBLISH_ARTICLE_LIST_NULL); } else { @@ -678,12 +686,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); return true; } + String quarterId = DateUtils.getQuarterId(form.getMonthId()); + String yearId = DateUtils.getYearId(form.getMonthId()); List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); detailListByParentCode.forEach(detail -> { // 社区下属所有网格治理能力汇总(平均值) if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) { - List subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScoreByAreaCode(form.getMonthId(),IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode()); + List subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScoreByAreaCodeNew(form.getMonthId(),IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); if (CollectionUtils.isEmpty(subGridGovernAvg)){ log.warn("社区下级治理能力平均分集合为空"); }else{ @@ -703,7 +713,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni } } else { // 治理能力的六个五级指标 - List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSubNotSelf(form.getMonthId(),form.getCustomerAreaCode(), ScreenConstant.COMMUNITY); + List> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSubNotSelfNew(form.getMonthId(),form.getCustomerAreaCode(), ScreenConstant.COMMUNITY,quarterId,yearId); if (CollectionUtils.isEmpty(communityGovernAbility)){ log.warn(IndexCalConstant.COMMUNITY_GOVERN_ABILITY_NULL); }else{ @@ -751,12 +761,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni log.error(IndexCalConstant.INDEX_DETAIL_LIST_NULL); return true; } + String quarterId = DateUtils.getQuarterId(form.getMonthId()); + String yearId = DateUtils.getYearId(form.getMonthId()); List indexInputVOS = new ArrayList<>(); Map pid = new HashMap<>(); detailListByParentCode.forEach(detail -> { String indexCode = detail.getIndexCode(); if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) { - List subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScoreByAreaCode(form.getMonthId(),IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode()); + List subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScoreByAreaCodeNew(form.getMonthId(),IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); if (CollectionUtils.isEmpty(subGridServiceAvg)) { log.warn("查询社区下级所有网格服务能力得分平均值集合为空"); } else { @@ -775,7 +787,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni }); } } else { - List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSubNotSelf(form.getMonthId(),form.getCustomerAreaCode()); + List> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSubNotSelfNew(form.getMonthId(),form.getCustomerAreaCode(),quarterId,yearId); if (CollectionUtils.isEmpty(communityActivityCountList)) { log.warn(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL); }else{ diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml index cee52bfea1..1257c3595a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml @@ -201,5 +201,49 @@ AND sca.AREA_CODE != #{areaCode} GROUP BY figc.agency_id + + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml index 5749931e9b..7aadbfe548 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml @@ -249,4 +249,27 @@ AND sca.AREA_CODE != #{areaCode} + + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml index 251956f3f4..457c90ea96 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml @@ -239,4 +239,25 @@ AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND sca.AREA_CODE != #{areaCode} + +