From 98af8a04be7b66ec645778146b8c37d77a5f0bf3 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 30 Mar 2021 13:39:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=20=E8=AF=84=E4=BB=B7=E5=91=A8=E6=9C=9F?= =?UTF-8?q?=E5=86=85=E8=A2=AB=E5=90=B9=E5=93=A8=E4=B8=94=E8=A2=AB=E5=8A=9E?= =?UTF-8?q?=E7=BB=93=E7=9A=84=E9=A1=B9=E7=9B=AE=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginProjectLogDailyDao.xml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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 2db8a97d58..0fe89ad0e9 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 @@ -198,15 +198,22 @@ COUNT(DISTINCT log.PROJECT_ID) AS count FROM fact_origin_project_log_daily log - LEFT JOIN fact_origin_project_main_daily project ON log.PROJECT_ID = project.ID AND project.DEL_FLAG = '0' AND project.CUSTOMER_ID = #{customerId} WHERE log.DEL_FLAG = '0' - AND project.PROJECT_STATUS LIKE 'close%' AND log.CUSTOMER_ID = #{customerId} AND log.IS_ACTIVE = '0' - 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} + + ) + log.AGENCY_ID = #{agencyId} From 7d0333004a11360c55dc42a8f4ff631cea90349b Mon Sep 17 00:00:00 2001 From: wangchao Date: Wed, 31 Mar 2021 16:22:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=84=E4=BB=B7?= =?UTF-8?q?=E5=91=A8=E6=9C=9F=E5=86=85=E8=A2=AB=E5=90=B9=E5=93=A8=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=95=B0=E4=B8=8E=E8=AF=84=E4=BB=B7=E5=91=A8=E6=9C=9F?= =?UTF-8?q?=E5=86=85=E8=A2=AB=E5=8A=9E=E7=BB=93=E9=A1=B9=E7=9B=AE=E6=95=B0?= =?UTF-8?q?=E7=9A=84=E7=AE=97=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginProjectLogDailyDao.xml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) 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 )