From 4233789e159c1b587ce9afbc175045612ae4cb45 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.com> Date: Wed, 22 Dec 2021 10:01:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E6=B2=BB=E7=90=86=E6=8C=87?= =?UTF-8?q?=E6=95=B0=20-=20=E6=9C=80=E7=BB=88=E7=89=881?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/screen/ScreenGovernanceDao.xml | 31 +++---------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenGovernanceDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenGovernanceDao.xml index 1a2a6936..561c8b88 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenGovernanceDao.xml +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenGovernanceDao.xml @@ -306,7 +306,10 @@ 0 AS eventResolvedCount, 0 AS eventUnResolvedCount, - IFNULL( gridsolved.gridClosedCount, 0 ) AS gridSelfGovernProjectTotal, + (IFNULL( item.issueProjectResolvedCount, 0 ) + IFNULL( item.issueProjectUnResolvedCount, 0 )) + - IFNULL( commsolved.communityClosedCount, 0 ) + - IFNULL( streetsolved.streetClosedCount, 0 ) + - IFNULL( districtsolved.districtClosedCount, 0 ) AS gridSelfGovernProjectTotal, IFNULL( commsolved.communityClosedCount, 0 ) AS communityClosedCount, IFNULL( streetsolved.streetClosedCount, 0 ) AS streetClosedCount, IFNULL( districtsolved.districtClosedCount, 0 ) AS districtDeptClosedCount @@ -384,32 +387,6 @@ GROUP BY t.GRID_ID ) selfsolved ON selfsolved.GRID_ID = sd.id - LEFT JOIN ( - SELECT - GRID_ID, - IFNULL( COUNT( 0 ), 0 ) AS gridClosedCount - FROM - ( - SELECT - GRID_ID, - eit.id, - hp.HANDLER_DEPT_ID, - eit.UPDATED_TIME - FROM - ( SELECT GRID_ID, ID, UPDATED_TIME, ITEM_STATE FROM esua_epdc_events.epdc_item eit - WHERE DEL_FLAG = '0' AND ITEM_STATE IN ( '5', '10' ) GROUP BY EVENT_ID) eit - LEFT JOIN esua_epdc_events.epdc_item_handle_process hp ON hp.item_id = eit.id - LEFT JOIN esua_epdc_admin.sys_dept sd ON sd.id = hp.HANDLER_DEPT_ID - WHERE - hp.DEL_FLAG = '0' - AND hp.STATE IN ( '5', '10' ) - AND sd.type_key IN ('grid_party', 'grid_dept') - GROUP BY eit.GRID_ID, eit.ID - ) t - WHERE - DATE_FORMAT( t.UPDATED_TIME, '%Y-%m-%d' ) <= DATE_FORMAT( date_add( now(), INTERVAL - 1 DAY ), '%Y-%m-%d' ) - GROUP BY t.GRID_ID - ) gridsolved ON gridsolved.GRID_ID = sd.id LEFT JOIN ( SELECT GRID_ID,