| | |
| | | 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); |
| | | } |
| | | } |