| | |
| | | @GetMapping("/statistics") |
| | | public CommonResult<Map<String, Object>> statistics(@Validated CockpitVO params) { |
| | | checkApiUtil.cockpit(params); |
| | | CommonResult.success(iBaseCaseService.statistics()); |
| | | StatisticsVO report = new StatisticsVO(); |
| | | report.setCount(63L); |
| | | report.setRatio(BigDecimal.valueOf(0.9141)); |
| | | report.setUp(true); |
| | | StatisticsVO dispose = new StatisticsVO(); |
| | | dispose.setCount(2743L); |
| | | dispose.setRatio(BigDecimal.valueOf(0.9946d)); |
| | | dispose.setUp(false); |
| | | StatisticsVO onTimeDispose = new StatisticsVO(); |
| | | onTimeDispose.setCount(2743L); |
| | | onTimeDispose.setRatio(BigDecimal.valueOf(1.0000)); |
| | | onTimeDispose.setUp(false); |
| | | StatisticsVO register = new StatisticsVO(); |
| | | register.setCount(2758L); |
| | | register.setRatio(BigDecimal.valueOf(0.3619)); |
| | | register.setUp(false); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("reported", report); |
| | | map.put("disposition", dispose); |
| | | map.put("dispositionInTime", onTimeDispose); |
| | | map.put("register", register); |
| | | return CommonResult.success(map); |
| | | return CommonResult.success(iBaseCaseService.statistics()); |
| | | // StatisticsVO report = new StatisticsVO(); |
| | | // report.setCount(63L); |
| | | // report.setRatio(BigDecimal.valueOf(0.9141)); |
| | | // report.setUp(true); |
| | | // StatisticsVO dispose = new StatisticsVO(); |
| | | // dispose.setCount(2743L); |
| | | // dispose.setRatio(new BigDecimal(0.9946d).setScale(4, BigDecimal.ROUND_HALF_UP).abs()); |
| | | // dispose.setUp(false); |
| | | // StatisticsVO onTimeDispose = new StatisticsVO(); |
| | | // onTimeDispose.setCount(2743L); |
| | | // onTimeDispose.setRatio(BigDecimal.valueOf(1.0000)); |
| | | // onTimeDispose.setUp(false); |
| | | // StatisticsVO register = new StatisticsVO(); |
| | | // register.setCount(2758L); |
| | | // register.setRatio(BigDecimal.valueOf(0.3619)); |
| | | // register.setUp(false); |
| | | // Map<String, Object> map = new HashMap<>(); |
| | | // map.put("reported", report); |
| | | // map.put("disposition", dispose); |
| | | // map.put("dispositionInTime", onTimeDispose); |
| | | // map.put("register", register); |
| | | // return CommonResult.success(map); |
| | | } |
| | | |
| | | @ApiOperation(value = "事件类型") |
| | |
| | | checkApiUtil.cockpit(params); |
| | | EnforcementEventsVO.TypeAndSourceVO typeAndSourceVO = new EnforcementEventsVO.TypeAndSourceVO(); |
| | | Long count = iViolationsService.count(); |
| | | // typeAndSourceVO.setAll(iViolationsService.count()); |
| | | typeAndSourceVO.setAll(7621L); |
| | | typeAndSourceVO.setAll(iViolationsService.count()); |
| | | // typeAndSourceVO.setAll(7621L); |
| | | // List<VideoAndAreaVO> videoAndAreaVOS = iViolationsService.selectType(); |
| | | // videoAndAreaVOS.stream().forEach(item -> item.setRatio(new BigDecimal(item.getCount() * 1.0 / count).setScale(4, BigDecimal.ROUND_HALF_UP))); |
| | | // typeAndSourceVO.setRecords(videoAndAreaVOS); |
| | |
| | | return videoAndAreaVO; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | collect.get(0).setCount(631L); |
| | | collect.get(1).setCount(569L); |
| | | collect.get(2).setCount(550L); |
| | | collect.get(3).setCount(491L); |
| | | collect.get(4).setCount(490L); |
| | | // collect.get(0).setCount(631L); |
| | | // collect.get(1).setCount(569L); |
| | | // collect.get(2).setCount(550L); |
| | | // collect.get(3).setCount(491L); |
| | | // collect.get(4).setCount(490L); |
| | | return CommonResult.success(collect); |
| | | } |
| | | |
| | |
| | | @GetMapping("/area") |
| | | public CommonResult area(@Validated CockpitVO params) { |
| | | checkApiUtil.cockpit(params); |
| | | // return CommonResult.success(iBaseCaseService.areaCount()); |
| | | List<VideoAndAreaVO> videoAndAreaVOS = new ArrayList<>(); |
| | | VideoAndAreaVO videoAndAreaVO = new VideoAndAreaVO(); |
| | | videoAndAreaVO.setName("妙高街道"); |
| | | videoAndAreaVO.setCount(7621L); |
| | | videoAndAreaVOS.add(videoAndAreaVO); |
| | | return CommonResult.success(videoAndAreaVOS); |
| | | return CommonResult.success(iBaseCaseService.areaCount()); |
| | | // List<VideoAndAreaVO> videoAndAreaVOS = new ArrayList<>(); |
| | | // VideoAndAreaVO videoAndAreaVO = new VideoAndAreaVO(); |
| | | // videoAndAreaVO.setName("妙高街道"); |
| | | // videoAndAreaVO.setCount(7621L); |
| | | // videoAndAreaVOS.add(videoAndAreaVO); |
| | | // return CommonResult.success(videoAndAreaVOS); |
| | | } |
| | | |
| | | @ApiOperation(value = "延误事件") |
| | |
| | | public CommonResult<EnforcementEventsVO.InfoVO> info(@Validated CockpitVO params) { |
| | | checkApiUtil.cockpit(params); |
| | | EnforcementEventsVO.InfoVO infoVO = new EnforcementEventsVO.InfoVO(); |
| | | // infoVO.setToday(iBaseCaseService.dayCount()); |
| | | infoVO.setToday(41); |
| | | // infoVO.setWeek(iBaseCaseService.weekCount()); |
| | | infoVO.setWeek(41); |
| | | infoVO.setToday(iBaseCaseService.dayCount()); |
| | | // infoVO.setToday(41); |
| | | infoVO.setWeek(iBaseCaseService.weekCount()); |
| | | // infoVO.setWeek(41); |
| | | infoVO.setDispatch(iBaseCaseService.dispatchCount()); |
| | | // infoVO.setIdentification(iBaseCaseService.alCount()); |
| | | infoVO.setIdentification(7621); |
| | | infoVO.setIdentification(iBaseCaseService.alCount()); |
| | | // infoVO.setIdentification(7621); |
| | | IPage<EventVO> page = iBaseCaseService.selectEventList(params.getBeginTime(), params.getEndTime(),params.getPageIndex(),params.getPageSize()); |
| | | infoVO.setEvent(page.getRecords()); |
| | | infoVO.setTotal(page.getTotal()); |