fuliqi
2024-03-26 5923f2345a695625da776338b9a218415f22fe0a
大屏数据恢复成实际数据
2个文件已修改
338 ■■■■ 已修改文件
ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java 252 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java 86 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java
@@ -133,132 +133,132 @@
    public CommonResult<List<AIIotStatisticsVO>> statistics(@Validated CockpitVO params) {
        checkApiUtil.cockpit(params);
//        List<AIIotStatisticsVO> list = iEfficiencyService.aiMonthList(params.getBeginTime(), params.getEndTime());
        List<AIIotStatisticsVO> list = new ArrayList<>();
        AIIotStatisticsVO a1 = new AIIotStatisticsVO();
        String type1 = "非机动车乱停放";
        List<AIIotStatisticsRecordVO> records1 = new ArrayList<>();
        AIIotStatisticsRecordVO ai1 = new AIIotStatisticsRecordVO();
        ai1.setMonth("2024-01");
        ai1.setCount(210);
        AIIotStatisticsRecordVO ai2 = new AIIotStatisticsRecordVO();
        ai2.setMonth("2023-12");
        ai2.setCount(183);
        AIIotStatisticsRecordVO ai3 = new AIIotStatisticsRecordVO();
        ai3.setMonth("2023-11");
        ai3.setCount(157);
        AIIotStatisticsRecordVO ai4 = new AIIotStatisticsRecordVO();
        ai4.setMonth("2023-10");
        ai4.setCount(231);
        AIIotStatisticsRecordVO ai5 = new AIIotStatisticsRecordVO();
        ai5.setMonth("2023-09");
        ai5.setCount(256);
        AIIotStatisticsRecordVO ai6 = new AIIotStatisticsRecordVO();
        ai6.setMonth("2023-08");
        ai6.setCount(311);
        records1.add(ai1);
        records1.add(ai2);
        records1.add(ai3);
        records1.add(ai4);
        records1.add(ai5);
        records1.add(ai6);
        a1.setType(type1);
        a1.setRecords(records1);
        list.add(a1);
        AIIotStatisticsVO a2 = new AIIotStatisticsVO();
        String type2 = "店外经营";
        List<AIIotStatisticsRecordVO> records2 = new ArrayList<>();
        AIIotStatisticsRecordVO bi1 = new AIIotStatisticsRecordVO();
        bi1.setMonth("2024-01");
        bi1.setCount(273);
        AIIotStatisticsRecordVO bi2 = new AIIotStatisticsRecordVO();
        bi2.setMonth("2023-12");
        bi2.setCount(231);
        AIIotStatisticsRecordVO bi3 = new AIIotStatisticsRecordVO();
        bi3.setMonth("2023-11");
        bi3.setCount(303);
        AIIotStatisticsRecordVO bi4 = new AIIotStatisticsRecordVO();
        bi4.setMonth("2023-10");
        bi4.setCount(219);
        AIIotStatisticsRecordVO bi5 = new AIIotStatisticsRecordVO();
        bi5.setMonth("2023-09");
        bi5.setCount(245);
        AIIotStatisticsRecordVO bi6 = new AIIotStatisticsRecordVO();
        bi6.setMonth("2023-08");
        bi6.setCount(223);
        records2.add(bi1);
        records2.add(bi2);
        records2.add(bi3);
        records2.add(bi4);
        records2.add(bi5);
        records2.add(bi6);
        a2.setType(type2);
        a2.setRecords(records2);
        list.add(a2);
        AIIotStatisticsVO a3 = new AIIotStatisticsVO();
        String type3 = "无照经营游商";
        List<AIIotStatisticsRecordVO> records3 = new ArrayList<>();
        AIIotStatisticsRecordVO ci1 = new AIIotStatisticsRecordVO();
        ci1.setMonth("2024-01");
        ci1.setCount(313);
        AIIotStatisticsRecordVO ci2 = new AIIotStatisticsRecordVO();
        ci2.setMonth("2023-12");
        ci2.setCount(247);
        AIIotStatisticsRecordVO ci3 = new AIIotStatisticsRecordVO();
        ci3.setMonth("2023-11");
        ci3.setCount(267);
        AIIotStatisticsRecordVO ci4 = new AIIotStatisticsRecordVO();
        ci4.setMonth("2023-10");
        ci4.setCount(249);
        AIIotStatisticsRecordVO ci5 = new AIIotStatisticsRecordVO();
        ci5.setMonth("2023-09");
        ci5.setCount(265);
        AIIotStatisticsRecordVO ci6 = new AIIotStatisticsRecordVO();
        ci6.setMonth("2023-08");
        ci6.setCount(306);
        records3.add(ci1);
        records3.add(ci2);
        records3.add(ci3);
        records3.add(ci4);
        records3.add(ci5);
        records3.add(ci6);
        a3.setType(type3);
        a3.setRecords(records3);
        list.add(a3);
        AIIotStatisticsVO a4 = new AIIotStatisticsVO();
        String type4 = "占道经营";
        List<AIIotStatisticsRecordVO> records4 = new ArrayList<>();
        AIIotStatisticsRecordVO di1 = new AIIotStatisticsRecordVO();
        di1.setMonth("2024-01");
        di1.setCount(267);
        AIIotStatisticsRecordVO di2 = new AIIotStatisticsRecordVO();
        di2.setMonth("2023-12");
        di2.setCount(347);
        AIIotStatisticsRecordVO di3 = new AIIotStatisticsRecordVO();
        di3.setMonth("2023-11");
        di3.setCount(354);
        AIIotStatisticsRecordVO di4 = new AIIotStatisticsRecordVO();
        di4.setMonth("2023-10");
        di4.setCount(314);
        AIIotStatisticsRecordVO di5 = new AIIotStatisticsRecordVO();
        di5.setMonth("2023-09");
        di5.setCount(317);
        AIIotStatisticsRecordVO di6 = new AIIotStatisticsRecordVO();
        di6.setMonth("2023-08");
        di6.setCount(274);
        records4.add(di1);
        records4.add(di2);
        records4.add(di3);
        records4.add(di4);
        records4.add(di5);
        records4.add(di6);
        a4.setType(type4);
        a4.setRecords(records4);
        list.add(a4);
        List<AIIotStatisticsVO> list = iEfficiencyService.aiMonthList(params.getBeginTime(), params.getEndTime());
//        List<AIIotStatisticsVO> list = new ArrayList<>();
//        AIIotStatisticsVO a1 = new AIIotStatisticsVO();
//        String type1 = "非机动车乱停放";
//        List<AIIotStatisticsRecordVO> records1 = new ArrayList<>();
//        AIIotStatisticsRecordVO ai1 = new AIIotStatisticsRecordVO();
//        ai1.setMonth("2024-01");
//        ai1.setCount(210);
//        AIIotStatisticsRecordVO ai2 = new AIIotStatisticsRecordVO();
//        ai2.setMonth("2023-12");
//        ai2.setCount(183);
//        AIIotStatisticsRecordVO ai3 = new AIIotStatisticsRecordVO();
//        ai3.setMonth("2023-11");
//        ai3.setCount(157);
//        AIIotStatisticsRecordVO ai4 = new AIIotStatisticsRecordVO();
//        ai4.setMonth("2023-10");
//        ai4.setCount(231);
//        AIIotStatisticsRecordVO ai5 = new AIIotStatisticsRecordVO();
//        ai5.setMonth("2023-09");
//        ai5.setCount(256);
//        AIIotStatisticsRecordVO ai6 = new AIIotStatisticsRecordVO();
//        ai6.setMonth("2023-08");
//        ai6.setCount(311);
//        records1.add(ai1);
//        records1.add(ai2);
//        records1.add(ai3);
//        records1.add(ai4);
//        records1.add(ai5);
//        records1.add(ai6);
//        a1.setType(type1);
//        a1.setRecords(records1);
//        list.add(a1);
//
//        AIIotStatisticsVO a2 = new AIIotStatisticsVO();
//        String type2 = "店外经营";
//        List<AIIotStatisticsRecordVO> records2 = new ArrayList<>();
//        AIIotStatisticsRecordVO bi1 = new AIIotStatisticsRecordVO();
//        bi1.setMonth("2024-01");
//        bi1.setCount(273);
//        AIIotStatisticsRecordVO bi2 = new AIIotStatisticsRecordVO();
//        bi2.setMonth("2023-12");
//        bi2.setCount(231);
//        AIIotStatisticsRecordVO bi3 = new AIIotStatisticsRecordVO();
//        bi3.setMonth("2023-11");
//        bi3.setCount(303);
//        AIIotStatisticsRecordVO bi4 = new AIIotStatisticsRecordVO();
//        bi4.setMonth("2023-10");
//        bi4.setCount(219);
//        AIIotStatisticsRecordVO bi5 = new AIIotStatisticsRecordVO();
//        bi5.setMonth("2023-09");
//        bi5.setCount(245);
//        AIIotStatisticsRecordVO bi6 = new AIIotStatisticsRecordVO();
//        bi6.setMonth("2023-08");
//        bi6.setCount(223);
//        records2.add(bi1);
//        records2.add(bi2);
//        records2.add(bi3);
//        records2.add(bi4);
//        records2.add(bi5);
//        records2.add(bi6);
//        a2.setType(type2);
//        a2.setRecords(records2);
//        list.add(a2);
//
//        AIIotStatisticsVO a3 = new AIIotStatisticsVO();
//        String type3 = "无照经营游商";
//        List<AIIotStatisticsRecordVO> records3 = new ArrayList<>();
//        AIIotStatisticsRecordVO ci1 = new AIIotStatisticsRecordVO();
//        ci1.setMonth("2024-01");
//        ci1.setCount(313);
//        AIIotStatisticsRecordVO ci2 = new AIIotStatisticsRecordVO();
//        ci2.setMonth("2023-12");
//        ci2.setCount(247);
//        AIIotStatisticsRecordVO ci3 = new AIIotStatisticsRecordVO();
//        ci3.setMonth("2023-11");
//        ci3.setCount(267);
//        AIIotStatisticsRecordVO ci4 = new AIIotStatisticsRecordVO();
//        ci4.setMonth("2023-10");
//        ci4.setCount(249);
//        AIIotStatisticsRecordVO ci5 = new AIIotStatisticsRecordVO();
//        ci5.setMonth("2023-09");
//        ci5.setCount(265);
//        AIIotStatisticsRecordVO ci6 = new AIIotStatisticsRecordVO();
//        ci6.setMonth("2023-08");
//        ci6.setCount(306);
//        records3.add(ci1);
//        records3.add(ci2);
//        records3.add(ci3);
//        records3.add(ci4);
//        records3.add(ci5);
//        records3.add(ci6);
//        a3.setType(type3);
//        a3.setRecords(records3);
//        list.add(a3);
//
//
//        AIIotStatisticsVO a4 = new AIIotStatisticsVO();
//        String type4 = "占道经营";
//        List<AIIotStatisticsRecordVO> records4 = new ArrayList<>();
//        AIIotStatisticsRecordVO di1 = new AIIotStatisticsRecordVO();
//        di1.setMonth("2024-01");
//        di1.setCount(267);
//        AIIotStatisticsRecordVO di2 = new AIIotStatisticsRecordVO();
//        di2.setMonth("2023-12");
//        di2.setCount(347);
//        AIIotStatisticsRecordVO di3 = new AIIotStatisticsRecordVO();
//        di3.setMonth("2023-11");
//        di3.setCount(354);
//        AIIotStatisticsRecordVO di4 = new AIIotStatisticsRecordVO();
//        di4.setMonth("2023-10");
//        di4.setCount(314);
//        AIIotStatisticsRecordVO di5 = new AIIotStatisticsRecordVO();
//        di5.setMonth("2023-09");
//        di5.setCount(317);
//        AIIotStatisticsRecordVO di6 = new AIIotStatisticsRecordVO();
//        di6.setMonth("2023-08");
//        di6.setCount(274);
//        records4.add(di1);
//        records4.add(di2);
//        records4.add(di3);
//        records4.add(di4);
//        records4.add(di5);
//        records4.add(di6);
//        a4.setType(type4);
//        a4.setRecords(records4);
//        list.add(a4);
        return CommonResult.success(list);
    }
ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java
@@ -54,29 +54,29 @@
    @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 = "事件类型")
@@ -85,8 +85,8 @@
        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);
@@ -157,11 +157,11 @@
            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);
    }
@@ -193,13 +193,13 @@
    @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 = "延误事件")
@@ -214,13 +214,13 @@
    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());