diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml index 8e37cf3359..9de83a3a9a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml @@ -101,14 +101,15 @@ PARENT_AGENCY_ID AS parentId FROM fact_index_agency_score fics + LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = fics.PARENT_AGENCY_ID WHERE fics.del_flag = '0' - AND fics.AGENCY_ID != '0' - AND fics.customer_id = #{customerId} - AND fics.month_id = #{monthId} - AND fics.index_code = #{indexCode} + AND sca.level = 'district' + AND fics.customer_id = #{customerId} + AND fics.month_id = #{monthId} + AND fics.index_code = #{indexCode} AND fics.DATA_TYPE = #{dataType} - GROUP BY fics.parent_agency_id + GROUP BY fics.parent_agency_id diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml index aca5ce3669..8be2f83314 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml @@ -83,6 +83,7 @@ WHERE fics.del_flag = '0' AND sca.DEL_FLAG = 0 + AND sca.level = 'street' AND fics.customer_id = #{customerId} AND fics.month_id = #{monthId} AND fics.index_code = #{indexCode} 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 aab983a94f..7f3912fa6f 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 @@ -135,10 +135,11 @@ sca.pid AS parentId FROM fact_index_grid_score figc - LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = figc.AGENCY_ID + LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = figc.AGENCY_ID WHERE figc.del_flag = '0' AND sca.DEL_FLAG = 0 + AND sca.level = 'community' AND figc.customer_id = #{customerId} AND figc.month_id = #{monthId} AND figc.index_code = #{indexCode}