From 0dc0a47cf5f655cb0dbff082f7c36613c21e328b Mon Sep 17 00:00:00 2001
From: 罗元桥 <2376770955@qq.com>
Date: 星期一, 12 七月 2021 18:30:01 +0800
Subject: [PATCH] Merge branch 'test' into 'master'

---
 springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
index 3b82fcd..0b39198 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
@@ -264,7 +264,7 @@
             }
 
             //当事件为特殊人群上报时,需要查询事件与人口关联关系
-            if(eventDetailsVO.getEventType().equals(6)){
+            if(eventDetailsVO.getEventType() != null && eventDetailsVO.getEventType().equals(6)){
                 List<EventSpecialPopulationDetailsVO> specialPopulationList = eventSpecialCrowdRecordMapper.getSpecialPopulationIds(eventDetailsVO.getId());
                 if(!specialPopulationList.isEmpty()){
                     specialPopulationList.forEach(special -> {
@@ -1939,6 +1939,16 @@
             statisticsDetailVO.setNoEventZFTotal(0);
         }
 
+        //查询网格
+        EventGridDataDO gridDataDO = eventGridDataMapper.selectById(statisticsDTO.getGridId());
+        if(gridDataDO != null){
+            Map<String,Long> sspCountMap = this.baseMapper.getSSPEventTotal(gridDataDO.getGridCommunityId());
+            if(!sspCountMap.isEmpty()){
+                statisticsDetailVO.setEventSSPTotal(sspCountMap.get("eventSSPTotal")!=null?sspCountMap.get("eventSSPTotal").intValue():0);
+                statisticsDetailVO.setNoEventSSPTotal(sspCountMap.get("noEventSSPTotal")!=null?sspCountMap.get("noEventSSPTotal").intValue():0);
+            }
+        }
+
         //统计数据
         Integer sum = statisticsDetailVO.getEventTFTotal() + statisticsDetailVO.getEventMDTotal() + statisticsDetailVO.getEventZATotal()
                 + statisticsDetailVO.getEventBWDTotal() + statisticsDetailVO.getEventTSTotal() + statisticsDetailVO.getEventGGTotal()

--
Gitblit v1.7.1