diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml index ca3a8ebb99..15caa333c3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactGridUserHouseDailyDao.xml @@ -98,21 +98,27 @@ fact_grid_user_house_daily d INNER JOIN dim_grid g ON g.id = d.GRID_ID INNER JOIN dim_agency c ON c.id = g.AGENCY_ID + WHERE d.DATE_ID = #{dateId} AND d.CUSTOMER_ID = #{customerId} - GROUP BY c.id INNER JOIN dim_agency s ON s.id = c.pid + WHERE + d.DATE_ID = #{dateId} + AND d.CUSTOMER_ID = #{customerId} GROUP BY s.id INNER JOIN dim_agency s ON s.id = c.pid INNER JOIN dim_agency di ON di.id = s.pid + WHERE + d.DATE_ID = #{dateId} + AND d.CUSTOMER_ID = #{customerId} GROUP BY di.id @@ -121,6 +127,9 @@ INNER JOIN dim_agency di ON di.id = s.pid INNER JOIN dim_agency ci ON ci.id = di.pid INNER JOIN dim_agency p ON p.id = ci.pid + WHERE + d.DATE_ID = #{dateId} + AND d.CUSTOMER_ID = #{customerId} GROUP BY ci.id @@ -129,6 +138,9 @@ INNER JOIN dim_agency di ON di.id = s.pid INNER JOIN dim_agency ci ON ci.id = di.pid INNER JOIN dim_agency p ON p.id = ci.pid + WHERE + d.DATE_ID = #{dateId} + AND d.CUSTOMER_ID = #{customerId} GROUP BY p.id