zhanghua
2023-04-14 e8a0f05f99f33fa05085536541da6bc27e66a644
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java
@@ -171,12 +171,12 @@
    }
    @Override
    public Page listViolationsPage(Integer current, Integer size, Integer state, Integer resource, String code, String categoryBig, String categorySmall, Integer street, String site, String startTime, String endTime, Integer violationsTypeId) {
    public Page listViolationsPage(Integer current, Integer size, Integer state, Integer resource, String code, String categoryBig, String categorySmall, Integer street, String site, String startTime, String endTime, Integer violationsTypeId,Integer videoId) {
        Integer type = 01;
        Integer hours = 60;
        Integer day = 24;
        Page page = new Page<>().setCurrent(current).setSize(size);
        Page<CasePoolViolationVO> violationsPage = baseCaseMapper.listViolationsPage(page, state, type, resource, code, categoryBig, categorySmall, street, site, startTime, endTime, violationsTypeId);
        Page<CasePoolViolationVO> violationsPage = baseCaseMapper.listViolationsPage(page, state, type, resource, code, categoryBig, categorySmall, street, site, startTime, endTime, violationsTypeId, videoId);
        violationsPage.getRecords().stream().forEach(item -> {
            if (item.getCloseTime() == null) {
                Duration duration = Duration.between(item.getAlarmTime(), LocalDateTime.now());
@@ -416,8 +416,8 @@
    }
    @Override
    public Page<BaseCaseVO> selectVideoInspection(Integer current, Long gradeId, Long videoId, String beginTime, String endTime) {
        return baseCaseMapper.selectVideoInspection(new Page<>(current, 1), gradeId, videoId, beginTime, endTime);
    public Page<BaseCaseVO> selectVideoInspection(Integer current,Integer pageSize, Long gradeId, Long videoId, String beginTime, String endTime) {
        return baseCaseMapper.selectVideoInspection(new Page<>(current, pageSize), gradeId, videoId, beginTime, endTime);
    }
    @Override
@@ -494,7 +494,7 @@
    public List<VideoAndAreaVO> areaCount() {
        List<VideoAndAreaVO> areaCountList = baseCaseMapper.areaCount();
        Long allCount = baseCaseMapper.selectCount(new LambdaQueryWrapper<>());
        areaCountList.stream().forEach(item -> item.setRatio(new BigDecimal(item.getCount() * 1.0 / allCount).setScale(2, BigDecimal.ROUND_HALF_UP)));
        areaCountList.stream().forEach(item -> item.setRatio(new BigDecimal(item.getCount() * 1.0 / allCount).setScale(4, BigDecimal.ROUND_HALF_UP)));
        return areaCountList;
    }
@@ -534,7 +534,7 @@
        if (reportLastMonthCount == 0) {
            report.setRatio(null);
        } else {
            report.setRatio(new BigDecimal(v).setScale(2, BigDecimal.ROUND_HALF_UP).abs());
            report.setRatio(new BigDecimal(v).setScale(4, BigDecimal.ROUND_HALF_UP).abs());
        }
        if (v < 0) {
            report.setUp(false);
@@ -556,7 +556,7 @@
        if (disposeLastMonthCount == 0) {
            dispose.setRatio(null);
        } else {
            dispose.setRatio(new BigDecimal(v1).setScale(2, BigDecimal.ROUND_HALF_UP).abs());
            dispose.setRatio(new BigDecimal(v1).setScale(4, BigDecimal.ROUND_HALF_UP).abs());
        }
        if (v1 < 0) {
            dispose.setUp(false);
@@ -572,7 +572,7 @@
        if (onTimeCaseLastMonthCount == 0) {
            onTimeDispose.setRatio(null);
        } else {
            onTimeDispose.setRatio(new BigDecimal(v2).setScale(2, BigDecimal.ROUND_HALF_UP).abs());
            onTimeDispose.setRatio(new BigDecimal(v2).setScale(4, BigDecimal.ROUND_HALF_UP).abs());
        }
        if (v2 < 0) {
            onTimeDispose.setUp(false);
@@ -596,7 +596,7 @@
        if (disposeLastMonthCount == 0) {
            register.setRatio(null);
        } else {
            register.setRatio(new BigDecimal(v3).setScale(2, BigDecimal.ROUND_HALF_UP).abs());
            register.setRatio(new BigDecimal(v3).setScale(4, BigDecimal.ROUND_HALF_UP).abs());
        }
        if (v3 < 0) {
            register.setUp(false);