From fe04402930fe373f6bd58ca5d4f7df62d7671527 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期一, 07 六月 2021 15:45:12 +0800 Subject: [PATCH] app统计模块 --- springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java | 53 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 49 insertions(+), 4 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 d21898e..71390d5 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 @@ -11,10 +11,7 @@ import com.panzhihua.common.model.dtos.grid.*; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComActVO; -import com.panzhihua.common.model.vos.grid.EventDetailsVO; -import com.panzhihua.common.model.vos.grid.EventResourceVO; -import com.panzhihua.common.model.vos.grid.EventTransferRecordVO; -import com.panzhihua.common.model.vos.grid.EventVO; +import com.panzhihua.common.model.vos.grid.*; import com.panzhihua.common.service.community.CommunityService; import com.panzhihua.common.utlis.StringUtils; import com.panzhihua.service_grid.dao.*; @@ -1622,4 +1619,52 @@ public R gridMemberStatistics(MemberStatisticsAdminDTO statisticsAdminDTO){ return R.ok(eventGridMemberRelationMapper.gridMemberStatistics(new Page(statisticsAdminDTO.getPageNum(),statisticsAdminDTO.getPageSize()),statisticsAdminDTO)); } + + /** + * 根据网格id查询网格统计数据 + * @param gridId 网格id + * @return 网格统计数据 + */ + @Override + public R getGridEventStatisticsByApp(Long gridId){ + return R.ok(this.baseMapper.getGridEventStatisticsByApp(gridId)); + } + + /** + * 查询网格事件统计数据 + * @param statisticsDTO 请求参数 + * @return 网格事件统计数据 + */ + @Override + public R getGridEventDetailStatisticsByApp(GridEventStatisticsDTO statisticsDTO){ + GridEventStatisticsDetailVO statisticsDetailVO = this.baseMapper.getGridEventDetailStatisticsByApp(statisticsDTO); + if(statisticsDetailVO == null){ + statisticsDetailVO = new GridEventStatisticsDetailVO(); + } + + if(statisticsDetailVO.getEventSSPTotal() == null){ + statisticsDetailVO.setEventSSPTotal(0); + } + if(statisticsDetailVO.getNoEventSSPTotal() == null){ + statisticsDetailVO.setNoEventSSPTotal(0); + } + if(statisticsDetailVO.getEventZFTotal() == null){ + statisticsDetailVO.setEventZFTotal(0); + } + if(statisticsDetailVO.getNoEventZFTotal() == null){ + statisticsDetailVO.setNoEventZFTotal(0); + } + + //统计数据 + Integer sum = statisticsDetailVO.getEventTFTotal() + statisticsDetailVO.getEventMDTotal() + statisticsDetailVO.getEventZATotal() + + statisticsDetailVO.getEventBWDTotal() + statisticsDetailVO.getEventTSTotal() + statisticsDetailVO.getEventGGTotal() + + statisticsDetailVO.getEventXCTotal() + statisticsDetailVO.getEventSSPTotal() + statisticsDetailVO.getEventZFTotal(); + statisticsDetailVO.setSum(sum); + + Integer noSum = statisticsDetailVO.getNoEventTFTotal() + statisticsDetailVO.getNoEventMDTotal() + statisticsDetailVO.getNoEventZATotal() + + statisticsDetailVO.getNoEventBWDTotal() + statisticsDetailVO.getNoEventTSTotal() + statisticsDetailVO.getNoEventGGTotal() + + statisticsDetailVO.getNoEventSSPTotal() + statisticsDetailVO.getNoEventZFTotal(); + statisticsDetailVO.setNoSum(noSum); + return R.ok(statisticsDetailVO); + } } -- Gitblit v1.7.1