From 529f049057ef8d5009ff3eef3c6f712e64b4c7d7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 23 May 2022 11:22:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=86=E7=B1=BB=E5=88=86?= =?UTF-8?q?=E6=9E=90=E9=A5=BC22?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/SubOrgResDTO.java | 2 ++ .../resources/mapper/CustomerAgencyDao.xml | 8 +++++-- .../main/java/com/epmet/dao/IcEventDao.java | 7 ++---- .../service/impl/IcEventServiceImpl.java | 10 ++++++-- .../src/main/resources/mapper/IcEventDao.xml | 24 +++++++++---------- 5 files changed, 30 insertions(+), 21 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java index 220c5c5bbf..8bc06550a1 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java @@ -17,4 +17,6 @@ public class SubOrgResDTO implements Serializable { */ private String orgType; private String orgName; + private String pid; + private String pids; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index b53781ea0e..50fbf27003 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -761,7 +761,9 @@ SELECT ca.ID AS orgId, ca.ORGANIZATION_NAME AS orgName, - 'agency' AS orgType + 'agency' AS orgType, + ca.PID, + ca.PIDS FROM customer_agency ca WHERE @@ -771,7 +773,9 @@ SELECT cg.ID AS orgId, cg.GRID_NAME AS orgName, - 'grid' AS orgType + 'grid' AS orgType, + cg.PID, + cg.PIDS FROM customer_grid cg WHERE diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java index 2c7812b93c..52196ff764 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java @@ -112,15 +112,12 @@ public interface IcEventDao extends BaseDao { */ void updateAutoEvaluation(@Param("ids")List ids); - Integer selectGridTotal(String gridId); - /** * - * @param orgId - * @param orgType + * @param formDTO * @return */ - Integer selectOrgTotal(@Param("orgId") String orgId, @Param("orgType") String orgType); + Integer selectOrgTotal(IcEventCategoryAnalysisFormDTO formDTO); /** * 居民端小程序我上报的事件-列表+详情 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java index 6ad0222007..faf39035ee 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java @@ -1007,7 +1007,7 @@ public class IcEventServiceImpl extends BaseServiceImpl 60*60*24*7 LIMIT #{no},#{size} - - SELECT count( ie.id ) as total FROM ic_event ie + inner join ic_event_category ic + on(ie.ID=ic.IC_EVENT_ID and ic.DEL_FLAG='0') WHERE ie.DEL_FLAG = '0' + AND ie.CUSTOMER_ID = #{customerId} + and ie.HAPPEN_TIME >= #{queryStartTime} + and ie.HAPPEN_TIME #{queryEndTime} - and ie.GRID_PIDS like CONCAT('%',#{orgId},'%') + and e.GRID_PIDS like CONCAT(#{gridPids},'%') - and ie.GRID_ID=#{orgId} + AND ie.GRID_ID = #{orgId} + + + and ic.CATEGORY_CODE like concat(#{categoryCode},'%')