From 61942ef747db4d4262cfca28de31a527afb35b5c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 3 Jun 2021 13:34:56 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=BA=A2=E9=BB=84=E7=BB=BF=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2=E6=97=B6=E9=97=B4?= =?UTF-8?q?=EF=BC=8C=E7=BB=9F=E4=B8=80=E6=94=B9=E4=B8=BA=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E6=9C=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ScreenProjectDataDao.java | 2 +- .../screen/impl/ScreenProjectServiceImpl.java | 16 +++------- .../mapper/screen/ScreenProjectDataDao.xml | 31 ++++++------------- 3 files changed, 14 insertions(+), 35 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java index 2ee4a79202..49797b9cb2 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java @@ -44,5 +44,5 @@ public interface ScreenProjectDataDao { * @author zxc * @date 2021/6/1 3:48 下午 */ - List selectColorProjectByAreaCode(@Param("areaCode") String areaCode,@Param("level")Integer level,@Param("monthCount")Integer monthCount); + List selectColorProjectByAreaCode(@Param("areaCode") String areaCode,@Param("monthCount")Integer monthCount); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java index 2e1e8babcf..91e8b227d8 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java @@ -156,7 +156,7 @@ public class ScreenProjectServiceImpl implements ScreenProjectService { /** * @Description 红黄绿事件总数 - * 绿色事件查询近30天,红色和黄色查询全部 + * 红黄绿事件均查询1个月以内的 * 可以添加传参 monthCount,查询几个月的绿色事件 * @Param formDTO * @author zxc @@ -169,17 +169,9 @@ public class ScreenProjectServiceImpl implements ScreenProjectService { if (StringUtils.isEmpty(formDTO.getAreaCode())){ list = screenProjectDataDao.selectColorProjectByAgencyId(formDTO.getAgencyId(), formDTO.getMonthCount()); }else { - List colorProjectTotal1 = screenProjectDataDao.selectColorProjectByAreaCode(formDTO.getAreaCode(), NumConstant.ONE, formDTO.getMonthCount()); - if (!CollectionUtils.isEmpty(colorProjectTotal1)){ - list.addAll(colorProjectTotal1); - } - List colorProjectTotal2 = screenProjectDataDao.selectColorProjectByAreaCode(formDTO.getAreaCode(), NumConstant.TWO, formDTO.getMonthCount()); - if (!CollectionUtils.isEmpty(colorProjectTotal2)){ - list.addAll(colorProjectTotal2); - } - List colorProjectTotal3 = screenProjectDataDao.selectColorProjectByAreaCode(formDTO.getAreaCode(), NumConstant.THREE, formDTO.getMonthCount()); - if (!CollectionUtils.isEmpty(colorProjectTotal3)){ - list.addAll(colorProjectTotal3); + List colorProjectTotal = screenProjectDataDao.selectColorProjectByAreaCode(formDTO.getAreaCode(), formDTO.getMonthCount()); + if (!CollectionUtils.isEmpty(colorProjectTotal)){ + list.addAll(colorProjectTotal); } } // 事件级别 红色1级:已超期;黄色2级:即将超期;绿色3级:未超期 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml index 210d0a1b27..26578cec46 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml @@ -115,21 +115,13 @@ @@ -139,11 +131,9 @@ LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = pd.ORG_ID WHERE pd.DEL_FLAG = '0' AND pd.ORG_TYPE = 'agency' - AND pd.PROJECT_LEVEL = #{level} + AND pd.PROJECT_LEVEL != 0 AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') - - AND UNIX_TIMESTAMP(pd.CREATED_TIME) >= UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL #{monthCount} MONTH)) - + AND UNIX_TIMESTAMP(pd.CREATED_TIME) >= UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL #{monthCount} MONTH)) ) UNION ALL (SELECT pd.PROJECT_LEVEL @@ -151,11 +141,9 @@ LEFT JOIN screen_customer_grid scg ON scg.GRID_ID = pd.ORG_ID WHERE pd.DEL_FLAG = '0' AND pd.ORG_TYPE = 'grid' - AND pd.PROJECT_LEVEL = #{level} + AND pd.PROJECT_LEVEL != 0 AND scg.AREA_CODE LIKE CONCAT(#{areaCode},'%') - - AND UNIX_TIMESTAMP(pd.CREATED_TIME) >= UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL #{monthCount} MONTH)) - + AND UNIX_TIMESTAMP(pd.CREATED_TIME) >= UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL #{monthCount} MONTH)) ) UNION ALL (SELECT pd.PROJECT_LEVEL @@ -163,10 +151,9 @@ LEFT JOIN screen_customer_dept scd ON scd.DEPT_ID = pd.ORG_ID WHERE pd.DEL_FLAG = '0' AND pd.ORG_TYPE = 'department' - AND pd.PROJECT_LEVEL = #{level} + AND pd.PROJECT_LEVEL != 0 AND scd.AREA_CODE LIKE CONCAT(#{areaCode},'%') - - AND UNIX_TIMESTAMP(pd.CREATED_TIME) >= UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL #{monthCount} MONTH)) - ) + AND UNIX_TIMESTAMP(pd.CREATED_TIME) >= UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL #{monthCount} MONTH)) + ) From e3e5fce2fbbb3fc9563ed1d1b4c4252e5af5d97c Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 3 Jun 2021 13:52:19 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B8=AD=E5=A4=AE=E5=8C=BA=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=88=86=E6=9E=90-=E9=A1=B9=E7=9B=AE=E5=88=86?= =?UTF-8?q?=E5=B8=83=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluationindex/screen/impl/ScreenProjectServiceImpl.java | 1 + .../src/main/resources/mapper/screen/ScreenProjectDataDao.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java index 91e8b227d8..4bf518855a 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java @@ -77,6 +77,7 @@ public class ScreenProjectServiceImpl implements ScreenProjectService { /** * @Description 中央区事件分析-项目分布 + * 【2021-06-03 修改查询红黄绿事件事件范围为一个月】 * @param formDTO * @return com.epmet.commons.tools.utils.Result * @Author liushaowen diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml index 26578cec46..3ed76af34c 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml @@ -17,6 +17,7 @@ screen_project_data WHERE del_flag = '0' + AND UNIX_TIMESTAMP(CREATED_TIME) >= UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL 1 MONTH)) and project_level = #{level} From 54ae4f9ec72cf333949a3eee2a37a25fb4f3c20a Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Thu, 3 Jun 2021 14:02:42 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A1=97=E9=81=93=EF=BC=9A=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E5=85=9A=E5=91=98=E6=95=B0=E3=80=81=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E6=95=B0=E3=80=81=E7=BD=91=E6=A0=BC=E5=91=98=E6=95=B0=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=AD=97=E6=AE=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/screen/ScreenUserTotalDataDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml index 815f5ec755..af7f1bfc34 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenUserTotalDataDao.xml @@ -89,7 +89,7 @@ td.ORG_ID AS agencyId, td.ORG_NAME AS agencyName, IFNULL(td.PARTY_TOTAL,0) AS partyMemberTotal, - IFNULL(td.USER_TOTAL,0) AS gridMemberTotal, + IFNULL(td.grid_member_total,0) AS gridMemberTotal, (SELECT COUNT(ID) FROM screen_customer_grid WHERE DEL_FLAG = '0' AND PARENT_AGENCY_ID = #{agencyId}) AS gridTotal FROM screen_customer_agency sca LEFT JOIN screen_user_total_data td ON td.ORG_ID = sca.AGENCY_ID @@ -102,7 +102,7 @@