From 51987bb9252bdca44f4d632786dfdcc0e4375532 Mon Sep 17 00:00:00 2001 From: liuchuang <123456> Date: Thu, 2 Dec 2021 14:38:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E6=8E=A8=E9=80=81=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=201=E3=80=81=E8=AE=AE=E9=A2=98=E8=BD=AC=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=8E=87=E8=AE=A1=E7=AE=97=E8=A7=84=E5=88=99=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/screen/ScreenIndexDataDao.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml index d5ffac05..9f07ff9a 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml @@ -241,10 +241,11 @@ count(et.IS_PARTY_MEMBER = '1' OR NULL) partyToItemNum, count(et.IS_PARTY_MEMBER = '0' OR NULL) userToItemNum FROM - esua_epdc_events.epdc_item et + esua_epdc_events.epdc_issue et WHERE et.DEL_FLAG = '0' AND date_format( et.CREATED_TIME, '%Y-%m' ) = #{yearMonth, jdbcType=VARCHAR} + AND et.`ISSUE_STATE` = 4 GROUP BY et.GRID_ID ) ite ON ite.GRID_ID = sd.ID LEFT JOIN ( @@ -433,20 +434,21 @@ IFNULL(itemCount.itemCloseNum, 0) resolveProjectCount, IFNULL(ROUND((IFNULL(itemCount.itemSatisfiedNum,0) * 0.6 + IFNULL(itemCount.itemVeryNum,0)) / IFNULL(itemCount.itemCloseAndScoreNum,0),4),0) * 100 satisfactionRatio, - ROUND(IFNULL(IFNULL(itemCount.itemNum,0) / IFNULL(issueCount.issueNum,0),0),4) * 100 issueToProjectRatio, + ROUND(IFNULL(IFNULL(issueCount.thisMonthIssueToItemCount,0) / IFNULL(issueCount.issueNum,0),0),4) * 100 issueToProjectRatio, IFNULL(itemCount.selfSolveProjectNum,0) selfSolveProjectCount, 0 AS transferRightRatio, 0 AS transferRightRatioFz, 0 AS transferRightRatioFm, IFNULL(itemCount.itemSatisfiedNum,0) * 0.6 + IFNULL(itemCount.itemVeryNum,0) satisfactionRatioFz, IFNULL(itemCount.itemCloseAndScoreNum,0) satisfactionRatioFm, - IFNULL(itemCount.itemNum,0) issueToProjectRatioFz, + IFNULL(issueCount.thisMonthIssueToItemCount,0) issueToProjectRatioFz, IFNULL(issueCount.issueNum,0) issueToProjectRatioFm from esua_epdc_admin.sys_dept sd left join ( select mei.GRID_ID DEPT_ID , - count(*) issueNum + count(*) issueNum, + CASE WHEN mei.`ISSUE_STATE` = 4 THEN SUM(1) ELSE SUM(0) END AS thisMonthIssueToItemCount from esua_epdc_events.epdc_issue mei where mei.DEL_FLAG = '0' and date_format(mei.CREATED_TIME, '%Y-%m' ) = #{yearMonth, jdbcType=VARCHAR}