From 518cbbb5dd3dc926bd96dc88cf8dc9a3900bb544 Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Tue, 13 Jul 2021 17:12:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=91=98=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=20bug=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/screen/ScreenGridManagerDao.xml | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenGridManagerDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenGridManagerDao.xml index 96b1a9d9..8a0f2d96 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenGridManagerDao.xml +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenGridManagerDao.xml @@ -55,11 +55,11 @@ 0 as projectClosedIncr - from js_esua_epdc_admin.sys_epmet_user_relation seur - right join js_esua_epdc_events.epdc_events ee on ee.MOBILE = seur.MOBILE and ee.DEL_FLAG = '0' - left join js_esua_epdc_admin.sys_dept sd on sd.id = ee.GRID_ID and sd.DEL_FLAG = '0' + from esua_epdc_admin.sys_epmet_user_relation seur + right join esua_epdc_events.epdc_events ee on ee.MOBILE = seur.MOBILE and ee.DEL_FLAG = '0' + left join esua_epdc_admin.sys_dept sd on sd.id = ee.GRID_ID and sd.DEL_FLAG = '0' where seur.DEL_FLAG = '0' AND ee.GRID_ID NOT IN ( - SELECT t.DEPT_ID FROM `js_esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0' + SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0' ) group by ee.MOBILE,ee.GRID_ID @@ -83,12 +83,12 @@ 0 as projectTransferIncr, 0 as projectClosedIncr - from js_esua_epdc_admin.sys_epmet_user_relation seur - left join js_esua_epdc_admin.sys_user eu on eu.MOBILE = seur.MOBILE - right join js_esua_epdc_events.epdc_item ei on ei.CREATED_BY = eu.id and ei.DEL_FLAG = '0' - left join js_esua_epdc_admin.sys_dept sd on sd.id = ei.GRID_ID and sd.DEL_FLAG = '0' + from esua_epdc_admin.sys_epmet_user_relation seur + left join esua_epdc_admin.sys_user eu on eu.MOBILE = seur.MOBILE + right join esua_epdc_events.epdc_item ei on ei.CREATED_BY = eu.id and ei.DEL_FLAG = '0' + left join esua_epdc_admin.sys_dept sd on sd.id = ei.GRID_ID and sd.DEL_FLAG = '0' where seur.DEL_FLAG = '0' and eu.DEL_FLAG = '0' AND ei.GRID_ID NOT IN ( - SELECT t.DEPT_ID FROM `js_esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0' + SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0' ) group by ei.CREATED_BY,ei.GRID_ID @@ -111,13 +111,13 @@ 0 as projectResponseIncr, 0 as projectTransferIncr, 0 as projectClosedIncr - from js_esua_epdc_admin.sys_epmet_user_relation seur - left join js_esua_epdc_admin.sys_user eu on eu.MOBILE = seur.MOBILE - right join js_esua_epdc_events.epdc_issue_handle ei on ei.CREATED_BY = eu.id and ei.DEL_FLAG = '0' and ei.STATE = 2 - right join js_esua_epdc_events.epdc_issue eii on ei.ISSUE_ID = eii.id and eii.DEL_FLAG = '0' - left join js_esua_epdc_admin.sys_dept sd on sd.id = eii.GRID_ID and sd.DEL_FLAG = '0' + from esua_epdc_admin.sys_epmet_user_relation seur + left join esua_epdc_admin.sys_user eu on eu.MOBILE = seur.MOBILE + right join esua_epdc_events.epdc_issue_handle ei on ei.CREATED_BY = eu.id and ei.DEL_FLAG = '0' and ei.STATE = 2 + right join esua_epdc_events.epdc_issue eii on ei.ISSUE_ID = eii.id and eii.DEL_FLAG = '0' + left join esua_epdc_admin.sys_dept sd on sd.id = eii.GRID_ID and sd.DEL_FLAG = '0' where seur.DEL_FLAG = '0' and eu.DEL_FLAG = '0' AND eii.GRID_ID NOT IN ( - SELECT t.DEPT_ID FROM `js_esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0' + SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0' ) group by ei.CREATED_BY,eii.GRID_ID @@ -141,14 +141,14 @@ count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = #{yearMonthDay} and ei.STATE = 0 and eid.ID is null or null) as projectResponseIncr, -- 项目响应数,dateId这一天的增量 count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = #{yearMonthDay} and ei.STATE = 0 and eid.ID is not null or null) as projectTransferIncr, -- 项目吹哨数,dateId这一天的增量 count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = #{yearMonthDay} and ei.STATE = 10 or null) as projectClosedIncr -- 项目结案数,dateId这一天的增量 - from js_esua_epdc_admin.sys_epmet_user_relation seur - left join js_esua_epdc_admin.sys_user eu on eu.MOBILE = seur.MOBILE - right join js_esua_epdc_events.epdc_item_handle_process ei on ei.CREATED_BY = eu.id and ei.DEL_FLAG = '0' - right join js_esua_epdc_events.epdc_item eii on ei.ITEM_ID = eii.id and eu.del_flag = '0' - left join js_esua_epdc_admin.sys_dept sd on sd.id = eii.GRID_ID and sd.DEL_FLAG = '0' - left join js_esua_epdc_events.epdc_item_dept eid on eid.ITEM_HANDLE_ID = ei.ID and eid.DEL_FLAG = '0' + from esua_epdc_admin.sys_epmet_user_relation seur + left join esua_epdc_admin.sys_user eu on eu.MOBILE = seur.MOBILE + right join esua_epdc_events.epdc_item_handle_process ei on ei.CREATED_BY = eu.id and ei.DEL_FLAG = '0' + right join esua_epdc_events.epdc_item eii on ei.ITEM_ID = eii.id and eu.del_flag = '0' + left join esua_epdc_admin.sys_dept sd on sd.id = eii.GRID_ID and sd.DEL_FLAG = '0' + left join esua_epdc_events.epdc_item_dept eid on eid.ITEM_HANDLE_ID = ei.ID and eid.DEL_FLAG = '0' where seur.DEL_FLAG = '0' and eu.DEL_FLAG = '0' AND eii.GRID_ID NOT IN ( - SELECT t.DEPT_ID FROM `js_esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0' + SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0' ) group by ei.CREATED_BY,eii.GRID_ID @@ -174,12 +174,12 @@ ee.GRID_ID, sd.pid AS agencyId, count(ee.ID) as reportProjectCount - from js_esua_epdc_admin.sys_epmet_user_relation seur - right join js_esua_epdc_events.epdc_events ee on ee.MOBILE = seur.MOBILE and ee.DEL_FLAG = '0' + from esua_epdc_admin.sys_epmet_user_relation seur + right join esua_epdc_events.epdc_events ee on ee.MOBILE = seur.MOBILE and ee.DEL_FLAG = '0' and DATE_FORMAT(ee.CREATED_TIME, '%Y-%m-%d') = #{yearMonthDay} - left join js_esua_epdc_admin.sys_dept sd on sd.id = ee.GRID_ID and sd.DEL_FLAG = '0' + left join esua_epdc_admin.sys_dept sd on sd.id = ee.GRID_ID and sd.DEL_FLAG = '0' where seur.DEL_FLAG = '0' AND ee.GRID_ID NOT IN ( - SELECT t.DEPT_ID FROM `js_esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0' + SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0' ) group by ee.MOBILE,ee.GRID_ID