From 67b9a654ef3dc38366962e8ea867fc291dcdcdd0 Mon Sep 17 00:00:00 2001 From: CeDo <cedoogle@gmail.com> Date: 星期一, 07 六月 2021 17:33:47 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/test_future_wangge' into test_future_wangge --- springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 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 d1d1b99..3c40986 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 @@ -1788,4 +1788,52 @@ return R.fail("参数错误"); } } + + /** + * 根据网格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