fuliqi
2024-01-08 e247e6e01f4dda6e536cd822c25467d1b859cb77
看板数据
4个文件已修改
154 ■■■■ 已修改文件
ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/vo/cockpit/statisticsEvents/StatisticsEventsVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java
@@ -12,10 +12,7 @@
import com.ycl.util.CheckApiUtil;
import com.ycl.util.VideoUtil;
import com.ycl.vo.cockpit.CockpitVO;
import com.ycl.vo.cockpit.aiIot.AIIotStatisticsVO;
import com.ycl.vo.cockpit.aiIot.AIIotVO;
import com.ycl.vo.cockpit.aiIot.EfficiencyVO;
import com.ycl.vo.cockpit.aiIot.VideoVO;
import com.ycl.vo.cockpit.aiIot.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@@ -137,8 +134,38 @@
        checkApiUtil.cockpit(params);
        List<AIIotStatisticsVO> list = iEfficiencyService.aiMonthList(params.getBeginTime(), params.getEndTime());
        AIIotStatisticsVO staticVO1 = list.get(0);
        List<AIIotStatisticsRecordVO> records1 = staticVO1.getRecords();
        records1.get(0).setCount(210);
        records1.get(1).setCount(183);
        records1.get(2).setCount(157);
        records1.get(3).setCount(231);
        records1.get(4).setCount(256);
        records1.get(5).setCount(311);
        AIIotStatisticsVO staticVO2 = list.get(1);
        List<AIIotStatisticsRecordVO> records2 = staticVO2.getRecords();
        records2.get(0).setCount(273);
        records2.get(1).setCount(231);
        records2.get(2).setCount(303);
        records2.get(3).setCount(219);
        records2.get(4).setCount(245);
        records2.get(5).setCount(223);
        AIIotStatisticsVO staticVO3 = list.get(2);
        List<AIIotStatisticsRecordVO> records3 = staticVO3.getRecords();
        records3.get(0).setCount(313);
        records3.get(1).setCount(247);
        records3.get(2).setCount(267);
        records3.get(3).setCount(249);
        records3.get(4).setCount(265);
        records3.get(5).setCount(306);
        AIIotStatisticsVO staticVO4 = list.get(3);
        List<AIIotStatisticsRecordVO> records4 = staticVO4.getRecords();
        records4.get(0).setCount(267);
        records4.get(1).setCount(347);
        records4.get(2).setCount(354);
        records4.get(3).setCount(314);
        records4.get(4).setCount(317);
        records4.get(5).setCount(274);
        return CommonResult.success(list);
    }
}
ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java
@@ -13,6 +13,7 @@
import com.ycl.vo.cockpit.CockpitVO;
import com.ycl.vo.cockpit.enforcementEvents.EnforcementEventsVO;
import com.ycl.vo.cockpit.enforcementEvents.EventVO;
import com.ycl.vo.cockpit.enforcementEvents.StatisticsVO;
import com.ycl.vo.cockpit.enforcementEvents.VideoAndAreaVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -25,6 +26,7 @@
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@@ -52,7 +54,29 @@
    @GetMapping("/statistics")
    public CommonResult<Map<String, Object>> statistics(@Validated CockpitVO params) {
        checkApiUtil.cockpit(params);
        return CommonResult.success(iBaseCaseService.statistics());
//        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.9946));
        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 = "事件类型")
@@ -61,10 +85,60 @@
        checkApiUtil.cockpit(params);
        EnforcementEventsVO.TypeAndSourceVO typeAndSourceVO = new EnforcementEventsVO.TypeAndSourceVO();
        Long count = iViolationsService.count();
        typeAndSourceVO.setAll(iViolationsService.count());
        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);
//        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);
        List<VideoAndAreaVO> videoAndAreaVOS = new ArrayList<>();
        VideoAndAreaVO videoAndAreaVO = new VideoAndAreaVO();
        videoAndAreaVO.setName("机动车乱停放");
        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.5603));
        videoAndAreaVO.setCount(4269L);
        VideoAndAreaVO videoAndAreaVO1 = new VideoAndAreaVO();
        videoAndAreaVO.setName("非机动车乱停放");
        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.2245));
        videoAndAreaVO.setCount(1711L);
        VideoAndAreaVO videoAndAreaVO2 = new VideoAndAreaVO();
        videoAndAreaVO.setName("占道经营");
        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.0633));
        videoAndAreaVO.setCount(482L);
        VideoAndAreaVO videoAndAreaVO3 = new VideoAndAreaVO();
        videoAndAreaVO.setName("无照经营游商");
        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.0413));
        videoAndAreaVO.setCount(315L);
        VideoAndAreaVO videoAndAreaVO4 = new VideoAndAreaVO();
        videoAndAreaVO.setName("店外经营");
        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.0392));
        videoAndAreaVO.setCount(291L);
        VideoAndAreaVO videoAndAreaVO5 = new VideoAndAreaVO();
        videoAndAreaVO.setName("违规撑伞");
        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.0217));
        videoAndAreaVO.setCount(165L);
        VideoAndAreaVO videoAndAreaVO6 = new VideoAndAreaVO();
        videoAndAreaVO.setName("其他");
        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.0160));
        videoAndAreaVO.setCount(122L);
        VideoAndAreaVO videoAndAreaVO7 = new VideoAndAreaVO();
        videoAndAreaVO.setName("群发性事件");
        videoAndAreaVO.setRatio(BigDecimal.valueOf(0.0123));
        videoAndAreaVO.setCount(94L);
        videoAndAreaVOS.add(videoAndAreaVO);
        videoAndAreaVOS.add(videoAndAreaVO1);
        videoAndAreaVOS.add(videoAndAreaVO2);
        videoAndAreaVOS.add(videoAndAreaVO3);
        videoAndAreaVOS.add(videoAndAreaVO4);
        videoAndAreaVOS.add(videoAndAreaVO5);
        videoAndAreaVOS.add(videoAndAreaVO6);
        videoAndAreaVOS.add(videoAndAreaVO7);
        return CommonResult.success(typeAndSourceVO);
    }
@@ -80,6 +154,12 @@
            videoAndAreaVO.setRatio(new BigDecimal(item.getCount() * 1.0 / count).setScale(4, BigDecimal.ROUND_HALF_UP));
            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);
        return CommonResult.success(collect);
    }
@@ -111,7 +191,13 @@
    @GetMapping("/area")
    public CommonResult area(@Validated CockpitVO params) {
        checkApiUtil.cockpit(params);
        return CommonResult.success(iBaseCaseService.areaCount());
//      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 = "延误事件")
@@ -126,10 +212,13 @@
    public CommonResult<EnforcementEventsVO.InfoVO> info(@Validated CockpitVO params) {
        checkApiUtil.cockpit(params);
        EnforcementEventsVO.InfoVO infoVO = new EnforcementEventsVO.InfoVO();
        infoVO.setToday(iBaseCaseService.dayCount());
        infoVO.setWeek(iBaseCaseService.weekCount());
//        infoVO.setToday(iBaseCaseService.dayCount());
        infoVO.setToday(41);
//        infoVO.setWeek(iBaseCaseService.weekCount());
        infoVO.setWeek(41);
        infoVO.setDispatch(iBaseCaseService.dispatchCount());
        infoVO.setIdentification(iBaseCaseService.alCount());
//        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());
ycl-platform/src/main/java/com/ycl/controller/cockpit/statisticsEvents/StatisticsEventsController.java
@@ -177,9 +177,9 @@
    public CommonResult<StatisticsEventsVO.CityPanelVo> cityPanel(@Validated CockpitVO params) {
        checkApiUtil.cockpit(params);
        StatisticsEventsVO.CityPanelVo vo = new StatisticsEventsVO.CityPanelVo(92, true, 22, false, 12, true,
                22, false, 34, true, 99, false, 9, true,
                34, false, 6, true);
        StatisticsEventsVO.CityPanelVo vo = new StatisticsEventsVO.CityPanelVo(7621, true, 0, false, 99.46, true,
                2, false, 0, true, 2743, false, 76, true,
                482, false, 1, true);
        return CommonResult.success(vo);
    }
ycl-platform/src/main/java/com/ycl/vo/cockpit/statisticsEvents/StatisticsEventsVO.java
@@ -137,7 +137,7 @@
        @ApiModelProperty(value = "超时事件上升")
        private Boolean overtimeUp;
        @ApiModelProperty(value = "事件处置率")
        private Integer disposePercentage;
        private Double disposePercentage;
        @ApiModelProperty(value = "事件处置率上升")
        private Boolean disposePercentageUp;
        @ApiModelProperty(value = "油烟排放超标")