fuliqi
2024-09-04 cc511acb919f842e95c2f6027f4fc4429c7b7b1a
权限配置、图像安全资源管理查询
11个文件已修改
86 ■■■■ 已修改文件
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/ImageResourceSecurity.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/CheckScoreController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/ContractResultController.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/ContractScoreController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/ImageResourceSecurityController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/YwUnitController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/mapper/ImageResourceSecurityDetailMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/YwThresholdServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/task/MonitorTask.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/ImageResourceSecurityDetailMapper.xml 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/ImageResourceSecurity.java
@@ -50,4 +50,5 @@
    @TableField(exist = false)
    private BigDecimal imageResourceSecurity;
}
ycl-server/src/main/java/com/ycl/platform/controller/CheckScoreController.java
@@ -34,7 +34,7 @@
    /**
     * 查询考核积分卡片列表
     */
    @PreAuthorize("@ss.hasPermi('check:score:list')")
    @PreAuthorize("@ss.hasPermi('check:score:query')")
    @GetMapping("/list")
    public AjaxResult list(CheckScore checkScore)
    {
@@ -69,7 +69,7 @@
    /**
     * 获取考核指标详细信息
     */
    @PreAuthorize("@ss.hasPermi('check:score:query')")
    @PreAuthorize("@ss.hasPermi('check:score:detail')")
    @GetMapping(value = "/detail/index")
    public AjaxResult getIndex(CheckScoreIndexDTO checkScoreIndexDTO)
    {
@@ -79,7 +79,7 @@
    /**
     * 发布考核积分
     */
    @PreAuthorize("@ss.hasPermi('check:score:edit')")
    @PreAuthorize("@ss.hasPermi('check:score:publish')")
    @Log(title = "发布考核积分", businessType = BusinessType.UPDATE)
    @PutMapping("/publish")
    public AjaxResult edit(@RequestBody CheckScoreDTO checkScoreDTO)
ycl-server/src/main/java/com/ycl/platform/controller/ContractResultController.java
@@ -32,7 +32,7 @@
    /**
     * 查询考核结果列表
     */
    @PreAuthorize("@ss.hasPermi('system:result:list')")
    @PreAuthorize("@ss.hasPermi('contract:result:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody ContractResultVO contractResult) {
        startPage();
@@ -43,7 +43,7 @@
    /**
     * 查询考核结果列表
     */
    @PreAuthorize("@ss.hasPermi('system:result:query')")
    @PreAuthorize("@ss.hasPermi('contract:result:query')")
    @GetMapping("/record/list")
    public TableDataInfo recordList(Long resultId, Long contractId) {
        List<ContractResultRecord> list = checkResultService.selectCheckResultRecordList(resultId, contractId);
@@ -53,7 +53,7 @@
    /**
     * 导出考核结果列表
     */
    @PreAuthorize("@ss.hasPermi('system:result:export')")
    @PreAuthorize("@ss.hasPermi('contract:result:export')")
    @Log(title = "考核结果", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, ContractResultVO contractResult) {
@@ -65,7 +65,7 @@
    /**
     * 获取考核结果详细信息
     */
    @PreAuthorize("@ss.hasPermi('system:result:query')")
    @PreAuthorize("@ss.hasPermi('contract:result:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(checkResultService.selectCheckResultById(id));
@@ -74,7 +74,7 @@
    /**
     * 新增考核结果
     */
    @PreAuthorize("@ss.hasPermi('system:result:add')")
    @PreAuthorize("@ss.hasPermi('contract:result:add')")
    @Log(title = "考核结果", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody ContractResult contractResult) {
@@ -84,7 +84,7 @@
    /**
     * 修改考核结果
     */
    @PreAuthorize("@ss.hasPermi('system:result:edit')")
    @PreAuthorize("@ss.hasPermi('contract:result:edit')")
    @Log(title = "考核结果", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody ContractResult contractResult) {
@@ -94,7 +94,7 @@
    /**
     * 发布考核结果
     */
    @PreAuthorize("@ss.hasPermi('system:result:publish')")
    @PreAuthorize("@ss.hasPermi('contract:result:publish')")
    @PutMapping("/publish/{id}")
    public AjaxResult publish(@PathVariable("id") Long id) {
        return toAjax(checkResultService.publish(id));
@@ -103,7 +103,7 @@
    /**
     * 删除考核结果
     */
    @PreAuthorize("@ss.hasPermi('system:result:remove')")
    @PreAuthorize("@ss.hasPermi('contract:result:remove')")
    @Log(title = "考核结果", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
ycl-server/src/main/java/com/ycl/platform/controller/ContractScoreController.java
@@ -31,7 +31,7 @@
    /**
     * 查询合同打分列表
     */
    @PreAuthorize("@ss.hasPermi('platform:score:list')")
    @PreAuthorize("@ss.hasPermi('contract:score:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody ContractScore contractScore) {
        startPage();
@@ -42,7 +42,7 @@
    /**
     * 导出合同打分列表
     */
    @PreAuthorize("@ss.hasPermi('platform:score:export')")
    @PreAuthorize("@ss.hasPermi('contract:score:export')")
    @PostMapping("/export")
    public void export(HttpServletResponse response, ContractScore contractScore) {
        List<ContractScore> list = defaultScoreService.selectDefaultScoreList(contractScore);
@@ -53,7 +53,7 @@
    /**
     * 获取合同打分详细信息
     */
    @PreAuthorize("@ss.hasPermi('platform:score:query')")
    @PreAuthorize("@ss.hasPermi('contract:score:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(defaultScoreService.getById(id));
@@ -62,7 +62,7 @@
    /**
     * 新增合同打分
     */
    @PreAuthorize("@ss.hasPermi('platform:score:add')")
    @PreAuthorize("@ss.hasPermi('contract:score:add')")
    @Log(title = "合同打分", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody ContractScore contractScore) {
@@ -72,7 +72,7 @@
    /**
     * 修改合同打分
     */
    @PreAuthorize("@ss.hasPermi('platform:score:edit')")
    @PreAuthorize("@ss.hasPermi('contract:score:edit')")
    @Log(title = "合同打分", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody ContractScore contractScore) {
@@ -82,7 +82,7 @@
    /**
     * 合同打分审核
     */
    @PreAuthorize("@ss.hasPermi('platform:score:audit')")
    @PreAuthorize("@ss.hasPermi('contract:score:audit')")
    @Log(title = "合同打分审核", businessType = BusinessType.UPDATE)
    @PostMapping("/auditing")
    public AjaxResult audit(@RequestBody ContractScore contractScore) {
@@ -92,7 +92,7 @@
    /**
     * 删除合同打分
     */
    @PreAuthorize("@ss.hasPermi('platform:score:remove')")
    @PreAuthorize("@ss.hasPermi('contract:score:remove')")
    @Log(title = "合同打分", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
ycl-server/src/main/java/com/ycl/platform/controller/ImageResourceSecurityController.java
@@ -31,7 +31,7 @@
    /**
     * 查询platform列表
     */
    @PreAuthorize("@ss.hasPermi('platform:security:list')")
    @PreAuthorize("@ss.hasPermi('imageResource:security:list')")
    @GetMapping("/list")
    public TableDataInfo list(ImageResourceSecurity imageResourceSecurity)
    {
@@ -42,7 +42,7 @@
    /**
     * 获取platform详细信息
     */
    @PreAuthorize("@ss.hasPermi('platform:security:query')")
    @PreAuthorize("@ss.hasPermi('imageResource:security:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
@@ -63,7 +63,7 @@
    /**
     * 导入模板
     */
    @PreAuthorize("@ss.hasPermi('platform:security:list')")
    @PreAuthorize("@ss.hasPermi('imageResource:security:template')")
    @Log(title = "导入模板", businessType = BusinessType.IMPORT)
    @PostMapping("/importTemplate")
    public void importTemplate(HttpServletResponse response) {
@@ -73,7 +73,7 @@
    /**
     * 导入数据
     */
    @PreAuthorize("@ss.hasPermi('platform:security:list')")
    @PreAuthorize("@ss.hasPermi('imageResource:security:import')")
    @Log(title = "导入", businessType = BusinessType.IMPORT)
    @PostMapping("/importData")
    public AjaxResult importData(MultipartFile file) {
ycl-server/src/main/java/com/ycl/platform/controller/YwUnitController.java
@@ -77,7 +77,7 @@
    @GetMapping("/list")
    @ApiOperation(value = "列表", notes = "列表")
    @PreAuthorize("@ss.hasPermi('unit:list')")
//    @PreAuthorize("@ss.hasPermi('unit:list')")
    public Result list() {
        return ywUnitService.all();
    }
ycl-server/src/main/java/com/ycl/platform/mapper/ImageResourceSecurityDetailMapper.java
@@ -1,6 +1,7 @@
package com.ycl.platform.mapper;
import com.ycl.platform.domain.entity.ImageResourceSecurityDetail;
import com.ycl.platform.domain.query.DataCenterQuery;
import org.apache.ibatis.annotations.Select;
import java.util.ArrayList;
@@ -28,7 +29,7 @@
     * @param imageResourceSecurityDetail 安全检测结果
     * @return 安全检测结果集合
     */
    public List<ImageResourceSecurityDetail> selectImageResourceSecurityDetailList(ImageResourceSecurityDetail imageResourceSecurityDetail);
    public List<ImageResourceSecurityDetail> selectImageResourceSecurityDetailList(DataCenterQuery query);
    /**
     * 新增安全检测结果
ycl-server/src/main/java/com/ycl/platform/service/impl/DataCenterServiceImpl.java
@@ -1021,9 +1021,8 @@
     */
    @Override
    public Result videoImageResourceSecurity(DataCenterQuery query) {
        ImageResourceSecurityDetail imageResourceSecurityDetail = new ImageResourceSecurityDetail();
        Page<ImageResourceSecurityDetail> page = PageHelper.startPage(query.getPageNum(), query.getPageSize());
        securityDetailMapper.selectImageResourceSecurityDetailList(imageResourceSecurityDetail);
        securityDetailMapper.selectImageResourceSecurityDetailList(query);
        // 统计数
        HashMap<String, Object> map = new HashMap<>();
ycl-server/src/main/java/com/ycl/platform/service/impl/YwThresholdServiceImpl.java
@@ -179,10 +179,10 @@
            check(YwThreadConstants.Face_NouniqueCount, nouniqueCount, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.MORE_THAN_EQ, ErrorType.NOT_UNIQUE_DATA_VOLUME.getValue());
            //检查人脸低评分率
            Float lowScorePercent = result.getSnapValidity().getLowScorePercent();
            check(YwThreadConstants.Face_LowScorePercent, lowScorePercent, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.LESS_THAN_EQ, ErrorType.FACE_LOW.getValue());
            check(YwThreadConstants.Face_LowScorePercent, lowScorePercent, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.MORE_THAN_EQ, ErrorType.FACE_LOW.getValue());
            //检查建模失败率
            Float failPercent = result.getSnapValidity().getFailPercent();
            check(YwThreadConstants.Face_FailPercent, failPercent, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.LESS_THAN_EQ, ErrorType.MODELING_FAIL.getValue());
            check(YwThreadConstants.Face_FailPercent, failPercent, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.MORE_THAN_EQ, ErrorType.MODELING_FAIL.getValue());
            // 点位在线率
            if (2 == result.getSnapResult()) {
                workOrder.setSerialNumber(result.getExternalIndexCode());
@@ -239,8 +239,8 @@
            //检查白天未识别量
            Integer dayNoNumberCountResult = result.getSnapPlate().getDayNoNumberCount();
            check(YwThreadConstants.Car_DayNoNumberCount, dayNoNumberCountResult, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.MORE_THAN_EQ, ErrorType.UNRECOGNIZED_DAY_VOLUME.getValue());
            //车辆六项属性不完整量
            Integer noIntegrityCountResult = result.getIntegrity().getNoIntegrityCount();
            //车辆主要属性不完整率
            Integer noIntegrityCountResult = result.getIntegrity().getMainNoIntegrityCount();
            check(YwThreadConstants.Car_NoIntegrityCount, noIntegrityCountResult, result.getExternalIndexCode(), thresholdMap, workOrder, CompareType.MORE_THAN_EQ, ErrorType.CAR_SIX.getValue());
            // 点位在线率
            if (2 == result.getSnapResult()) {
ycl-server/src/main/java/com/ycl/task/MonitorTask.java
@@ -64,7 +64,7 @@
        Query query = new Query(Criteria.where("mongoCreateTime").gte(DateUtils.getDayStart(yesterday)).lt(DateUtils.getDayEnd(yesterday)));
        List<MonitorQualifyResult> oneMachineFileResults = mongoTemplate.find(query, MonitorQualifyResult.class);
        //mongo品牌数据
        Query OSDQuery = new Query(Criteria.where("mongoCreateTime").gte(DateUtils.getDayStart(yesterday)).lt(DateUtils.getDayEnd(yesterday))));
        Query OSDQuery = new Query(Criteria.where("mongoCreateTime").gte(DateUtils.getDayStart(yesterday)).lt(DateUtils.getDayEnd(yesterday)));
        Map<String, OsdCheckResult> osdMap = mongoTemplate.find(query, OsdCheckResult.class).stream().collect(Collectors.toMap(OsdCheckResult::getDeviceNo, Function.identity()));
        //数据库monitor表数据
        Map<String, TMonitorVO> monitorVOMap = monitorMapper.selectMonitorVOList().stream().collect(Collectors.toMap(TMonitorVO::getSerialNumber, Function.identity()));
ycl-server/src/main/resources/mapper/zgyw/ImageResourceSecurityDetailMapper.xml
@@ -27,7 +27,8 @@
        FROM t_image_resource_security_detail
    </sql>
    <select id="selectImageResourceSecurityDetailList" resultType="com.ycl.platform.domain.entity.ImageResourceSecurityDetail">
    <select id="selectImageResourceSecurityDetailList"
            resultType="com.ycl.platform.domain.entity.ImageResourceSecurityDetail">
        select id,
        ip,
        a.dept_id,
@@ -40,12 +41,14 @@
        from t_image_resource_security_detail a
        LEFT JOIN sys_dept b ON a.dept_id = b.dept_id AND b.del_flag = 0
        <where>
            <if test="ip != null  and ip != ''">and ip = #{ip}</if>
            <if test="deptId != null ">and a.dept_id = #{deptId}</if>
            <if test="alarmCategory != null  and alarmCategory != ''">and alarm_category = #{alarmCategory}</if>
            <if test="alarmLevel != null ">and alarm_level = #{alarmLevel}</if>
            <if test="num != null ">and num = #{num}</if>
            <if test="alarmTime != null ">and alarm_time = #{alarmTime}</if>
            <if test="startTime!=null and endTime!=null">
                and a.alarm_time between #{startTime} and #{endTime}
            </if>
            <if test="keyword!=null and keyword!=''">
                and (b.dept_name like concat('%',#{keyword},'%') or
                a.ip like concat('%',#{keyword},'%')
                )
            </if>
        </where>
    </select>
@@ -78,9 +81,11 @@
    </insert>
    <insert id="saveBatch">
        INSERT INTO t_image_resource_security_detail (ip, dept_id, alarm_category, alarm_level, num, alarm_time, create_time) VALUES
        INSERT INTO t_image_resource_security_detail (ip, dept_id, alarm_category, alarm_level, num, alarm_time,
        create_time) VALUES
        <foreach collection="list" item="item" index="index" separator=",">
            (#{item.ip}, #{item.deptId}, #{item.alarmCategory}, #{item.alarmLevel}, #{item.num}, #{item.alarmTime}, NOW())
            (#{item.ip}, #{item.deptId}, #{item.alarmCategory}, #{item.alarmLevel}, #{item.num}, #{item.alarmTime},
            NOW())
        </foreach>
    </insert>