diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml index 0fe89ad0e9..1d5b5c6e79 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml @@ -165,7 +165,7 @@ AGENCY_ID, COUNT(DISTINCT PROJECT_ID) AS count FROM - fact_origin_project_log_daily + fact_origin_project_log_daily log WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} AND IS_ACTIVE = '0' @@ -173,13 +173,14 @@ AND MONTH_ID = #{dimId} AND NOT EXISTS( SELECT ID - FROM fact_origin_project_log_daily + FROM fact_origin_project_log_daily innerLog WHERE DEL_FLAG = '0' AND MONTH_ID #{dimId} AND IS_ACTIVE = '0' + AND log.project_id = innerLog.project_id - AGENCY_ID = #{agencyId} + innerLog.AGENCY_ID = #{agencyId} ) @@ -204,13 +205,10 @@ AND log.MONTH_ID = #{dimId} AND EXISTS ( - select id from fact_origin_project_log_daily where del_flag = '0' - and customer_id = #{customerId} and month_id = #{dimId} - and action_code like 'close%' - - - AGENCY_ID = #{agencyId} - + select innerLog.id from fact_origin_project_log_daily innerLog where innerLog.del_flag = '0' + and innerLog.customer_id = #{customerId} and innerLog.month_id = #{dimId} + and innerLog.action_code like 'close%' + and innerLog.project_id = log.project_id )