From 5af2524824a83a8ce5accef2953573718b69eb78 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 22 Jun 2021 09:11:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=BB=E7=90=86=E8=83=BD=E5=8A=9B=E6=8E=92?= =?UTF-8?q?=E8=A1=8C=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/FactOriginProjectLogDailyDao.xml | 34 ++++++------- .../extract/FactOriginProjectMainDailyDao.xml | 48 +++++++++---------- 2 files changed, 42 insertions(+), 40 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 bd57a4df1e..b5a2fe362f 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 @@ -330,20 +330,20 @@ IFNULL( b.count, 0 ) AS "count" FROM - (SELECT f.AGENCY_ID, + (SELECT da.ID AS AGENCY_ID, COUNT( f.ID ) AS "count" FROM fact_origin_project_log_daily f - INNER JOIN dim_agency da ON f.AGENCY_ID = da.ID + INNER JOIN dim_agency da ON f.PIDS LIKE CONCAT( '%', da.ID, '%' ) AND da.`LEVEL` = #{level} WHERE f.IS_ACTIVE = 0 AND f.CUSTOMER_ID = #{customerId} AND f.MONTH_ID = #{monthId} - GROUP BY f.AGENCY_ID ) a + GROUP BY da.ID ) a LEFT JOIN - (SELECT f.AGENCY_ID, + (SELECT da.ID AS AGENCY_ID, COUNT( f.ID ) AS "count" FROM fact_origin_project_log_daily f - INNER JOIN dim_agency da ON f.AGENCY_ID = da.ID + INNER JOIN dim_agency da ON f.PIDS LIKE CONCAT( '%', da.ID, '%' ) AND da.`LEVEL` = #{level} WHERE ( ACTION_CODE = 'close' @@ -354,7 +354,7 @@ AND f.IS_ACTIVE = 1 AND f.CUSTOMER_ID = #{customerId} AND f.MONTH_ID = #{monthId} - GROUP BY f.AGENCY_ID ) b + GROUP BY da.ID ) b ON a.AGENCY_ID = b.AGENCY_ID