fuliqi
2023-11-30 e5bf0d08d05f5c58224fe28cdf743a1bae88e3f0
ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java
@@ -59,6 +59,7 @@
    @Autowired
    IEfficiencyService iEfficiencyService;
    @ApiOperation(value = "监测数据")
    @GetMapping("/detection")
    public CommonResult<AIIotVO.DetectionVO> detection(@Validated CockpitVO params) {
@@ -66,9 +67,9 @@
        AIIotVO.DetectionVO detectionVO = new AIIotVO.DetectionVO();
        detectionVO.setVideo(iVideoPointService.count());
        detectionVO.setIndividual(iHandheldTerminalService.count());
        detectionVO.setLampblack(154L);
        /// TODO: 2022/12/13 缺少油烟机监控表
        detectionVO.setLoudspeaker(loudspeakerService.count());
        detectionVO.setLampblack(iEfficiencyService.getSmokeCustomer());
        detectionVO.setLoudspeaker(34L);
        detectionVO.setSlagCar(iCarSlagcarService.count());
        return CommonResult.success(detectionVO);
    }
@@ -80,7 +81,7 @@
        /// TODO: 2022/12/13  视频点位设备为空 没数据
        List<VideoPoint> list = iVideoPointService.list(new LambdaQueryWrapper<VideoPoint>()
                .eq(params.getStreetId() != null, VideoPoint::getStreetId, params.getStreetId())
                .isNotNull(VideoPoint::getPlatResourceId));
                .isNotNull(VideoPoint::getPlatResourceId).orderByDesc(VideoPoint::getId));
        List<VideoVO> vos = list.stream().map(item -> {
            VideoVO videoVO = new VideoVO();
@@ -91,6 +92,7 @@
            videoVO.setLatitude(item.getLatitude() != null ? item.getLatitude().toString() : "");
            videoVO.setLongitude(item.getLongitude() != null ? item.getLongitude().toString() : "");
            videoVO.setResourceId(item.getPlatResourceId());
            videoVO.setCode(item.getCode());
            return videoVO;
        }).collect(Collectors.toList());
@@ -110,6 +112,10 @@
            a.setRatio(1.0 - ((double) efficiencyDto.getErrorNumber() / (double) efficiencyDto.getNumber()));
            return a;
        }).collect(Collectors.toList());
        efficiencyVOS.add(new EfficiencyVO("店外经营", 0, 0.0));
        efficiencyVOS.add(new EfficiencyVO("沿街晾晒", 0, 0.0));
        efficiencyVOS.add(new EfficiencyVO("无照经营游商", 0, 0.0));
        efficiencyVOS.add(new EfficiencyVO("违规撑伞", 0, 0.0));
        return CommonResult.success(efficiencyVOS);
    }
@@ -117,9 +123,11 @@
    @GetMapping("/slag_car")
    public CommonResult<AIIotVO.SlagCarVO> slagCar(@Validated CockpitVO params) {
        checkApiUtil.cockpit(params);
        AIIotVO.SlagCarVO slagCarVO = new AIIotVO.SlagCarVO();
        slagCarVO.setCar(236);
        slagCarVO.setTeam(20);
        slagCarVO.setCar(iCarSlagcarService.count());
        slagCarVO.setTeam(0L);
        return CommonResult.success(slagCarVO);
    }
@@ -128,7 +136,7 @@
    public CommonResult<List<AIIotStatisticsVO>> statistics(@Validated CockpitVO params) {
        checkApiUtil.cockpit(params);
        List<AIIotStatisticsVO> list = iEfficiencyService.aiMonthList();
        List<AIIotStatisticsVO> list = iEfficiencyService.aiMonthList(params.getBeginTime(), params.getEndTime());
        return CommonResult.success(list);
    }