wl
2022-12-16 306edc156e365af506552c4a070ada91deeacfb1
fix: 预警研判案件确定不走上报接口
3个文件已修改
32 ■■■■■ 已修改文件
ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ycl.api.CommonResult;
import com.ycl.controller.video.common.constant.BaseCaseStatus;
import com.ycl.dto.trend.TrendAnalysisParam;
import com.ycl.entity.caseHandler.BaseCase;
import com.ycl.entity.caseHandler.Violations;
@@ -29,6 +30,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
import java.util.stream.Collectors;
/**
@@ -55,15 +57,16 @@
    public CommonResult<Map<String, Object>> statistics(@Validated CockpitVO params) {
        checkApiUtil.cockpit(params);
        Map<String, Object> map = new HashMap<>();
        EnforcementEventsVO.StatisticsEventVO eventVO = new EnforcementEventsVO.StatisticsEventVO();
        eventVO.setCount(10);
        eventVO.setRatio(new BigDecimal("0.69").setScale(2, RoundingMode.HALF_UP));
        eventVO.setUp(true);
        map.put("reported", eventVO);
        map.put("disposition", eventVO);
        map.put("dispositionInTime", eventVO);
        map.put("register", eventVO);
        return CommonResult.success(map);
//        EnforcementEventsVO.StatisticsEventVO eventVO = new EnforcementEventsVO.StatisticsEventVO();
//        eventVO.setCount(10);
//        eventVO.setRatio(new BigDecimal("0.69").setScale(2, RoundingMode.HALF_UP));
//        eventVO.setUp(true);
//        iBaseCaseService.count();
//        map.put("reported", eventVO);
//        map.put("disposition", eventVO);
//        map.put("dispositionInTime", eventVO);
//        map.put("register", eventVO);
        return CommonResult.success(iBaseCaseService.statistics());
    }
    @ApiOperation(value = "事件类型")
ycl-platform/src/main/java/com/ycl/service/caseHandler/IBaseCaseService.java
@@ -86,4 +86,6 @@
    List<VideoAndAreaVO> areaCount();
    List<DelayVO> selectDelayList();
    Map<String,Object> statistics();
}
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java
@@ -449,7 +449,8 @@
            iDispatchHandleService.dispatch(dispatchInfoParam);
        }
        if (violationParam.getState() == 2) {
            baseCaseService.uploadEvent(violationParam.getBaseId());
//            baseCaseService.uploadEvent(violationParam.getBaseId());
            /// TODO: 2022/12/16 上报接口未实现
        }
        return violationsMapper.updateById(violations) == 1 ? true : false;
    }
@@ -509,4 +510,10 @@
        return delayVOS;
    }
    @Override
    public Map<String, Object> statistics() {
        baseCaseMapper.selectCount(new LambdaQueryWrapper<BaseCase>().eq(BaseCase::getState, BaseCaseStatus.REPORT));
        return null;
    }
}