fuliqi
2024-08-08 5414f8d8729ab68b9ce53c40accb8baa4c5bd808
Merge remote-tracking branch 'origin/master'
13个文件已修改
210 ■■■■ 已修改文件
ycl-server/src/main/java/com/ycl/platform/controller/DashboardController.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexCarMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexFaceMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexVideoMapper.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/ICheckIndexCarService.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/ICheckIndexFaceService.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/ICheckIndexVideoService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckIndexCarServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckIndexFaceServiceImpl.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckIndexVideoServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/CheckIndexCarMapper.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/CheckIndexFaceMapper.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/DashboardController.java
@@ -1,8 +1,7 @@
package com.ycl.platform.controller;
import com.ycl.platform.domain.query.DashboardQuery;
import com.ycl.platform.service.ITMonitorService;
import com.ycl.platform.service.WorkOrderService;
import com.ycl.platform.service.*;
import com.ycl.system.service.ISysDeptService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
@@ -25,6 +24,9 @@
    private final WorkOrderService workOrderService;
    private final ITMonitorService monitorService;
    private final ISysDeptService deptService;
    private final ICheckIndexFaceService checkIndexFaceService;
    private final ICheckIndexCarService checkIndexCarService;
    private final ICheckIndexVideoService checkIndexVideoService;
    @GetMapping("/department")
    public AjaxResult department() {
@@ -51,5 +53,19 @@
        return AjaxResult.success(monitorService.monitorRate(dashboardQuery));
    }
    @GetMapping("/check/face")
    public AjaxResult checkFace(DashboardQuery dashboardQuery) {
        return AjaxResult.success(checkIndexFaceService.dashboard(dashboardQuery));
    }
    @GetMapping("/check/car")
    public AjaxResult checkCar(DashboardQuery dashboardQuery) {
        return AjaxResult.success(checkIndexCarService.dashboard(dashboardQuery));
    }
    @GetMapping("/check/video")
    public AjaxResult checkVideo(DashboardQuery dashboardQuery) {
        return AjaxResult.success(checkIndexVideoService.dashboard(dashboardQuery));
    }
}
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexCarMapper.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ycl.platform.domain.entity.CheckIndexCar;
import com.ycl.platform.domain.query.DashboardQuery;
import java.util.List;
@@ -63,4 +64,10 @@
    public List<CheckIndexCar> selectToday(String today);
    /**
     * 大屏车辆考核
     * @param dashboardQuery 查询条件
     * @return 数据
     */
    CheckIndexCar dashboard(DashboardQuery dashboardQuery);
}
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexFaceMapper.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ycl.platform.domain.entity.CheckIndexFace;
import com.ycl.platform.domain.query.DashboardQuery;
import java.util.List;
@@ -63,4 +64,10 @@
    List<CheckIndexFace> selectToday(String date);
    /**
     * 大屏人脸考核
     * @param dashboardQuery 查询条件
     * @return 数据
     */
    CheckIndexFace dashboard(DashboardQuery dashboardQuery);
}
ycl-server/src/main/java/com/ycl/platform/mapper/CheckIndexVideoMapper.java
@@ -1,8 +1,8 @@
package com.ycl.platform.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ycl.platform.domain.entity.CheckIndexFace;
import com.ycl.platform.domain.entity.CheckIndexVideo;
import com.ycl.platform.domain.query.DashboardQuery;
import java.util.List;
@@ -63,4 +63,11 @@
    public int deleteCheckIndexVideoByIds(Long[] ids);
    List<CheckIndexVideo> selectToday(String date);
    /**
     * 大屏人脸考核
     * @param dashboardQuery 查询条件
     * @return 数据
     */
    CheckIndexVideo dashboard(DashboardQuery dashboardQuery);
}
ycl-server/src/main/java/com/ycl/platform/service/ICheckIndexCarService.java
@@ -2,7 +2,7 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.ycl.platform.domain.entity.CheckIndexCar;
import com.ycl.platform.domain.result.HK.SnapshotDataMonitorResult;
import com.ycl.platform.domain.query.DashboardQuery;
import java.util.List;
@@ -62,4 +62,10 @@
     */
    public int deleteCheckIndexCarById(Long id);
    /**
     * 大屏车辆考核
     * @param dashboardQuery 查询条件
     * @return 数据
     */
    CheckIndexCar dashboard(DashboardQuery dashboardQuery);
}
ycl-server/src/main/java/com/ycl/platform/service/ICheckIndexFaceService.java
@@ -1,9 +1,8 @@
package com.ycl.platform.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ycl.platform.domain.entity.CheckIndexCar;
import com.ycl.platform.domain.entity.CheckIndexFace;
import com.ycl.platform.domain.result.HK.SnapshotDataMonitorResult;
import com.ycl.platform.domain.query.DashboardQuery;
import java.util.List;
@@ -63,4 +62,10 @@
     */
    public int deleteCheckIndexFaceById(Long id);
    /**
     * 大屏人脸考核
     * @param dashboardQuery 查询条件
     * @return 数据
     */
    CheckIndexFace dashboard(DashboardQuery dashboardQuery);
}
ycl-server/src/main/java/com/ycl/platform/service/ICheckIndexVideoService.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.ycl.platform.domain.entity.CheckIndexVideo;
import com.ycl.platform.domain.query.DashboardQuery;
import java.util.List;
@@ -59,4 +60,11 @@
     * @return 结果
     */
    public int deleteCheckIndexVideoById(Long id);
    /**
     * 大屏视频考核
     * @param dashboardQuery 查询条件
     * @return 数据
     */
    CheckIndexVideo dashboard(DashboardQuery dashboardQuery);
}
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckIndexCarServiceImpl.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ycl.platform.domain.entity.CheckIndexCar;
import com.ycl.platform.domain.query.DashboardQuery;
import com.ycl.platform.mapper.CheckIndexCarMapper;
import com.ycl.platform.service.ICheckIndexCarService;
import com.ycl.platform.service.ITMonitorService;
@@ -97,4 +98,9 @@
    public int deleteCheckIndexCarById(Long id) {
        return checkIndexCarMapper.deleteCheckIndexCarById(id);
    }
    @Override
    public CheckIndexCar dashboard(DashboardQuery dashboardQuery) {
        return checkIndexCarMapper.dashboard(dashboardQuery);
    }
}
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckIndexFaceServiceImpl.java
@@ -1,30 +1,18 @@
package com.ycl.platform.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ycl.platform.domain.entity.CheckIndexCar;
import com.ycl.platform.domain.entity.CheckIndexFace;
import com.ycl.platform.domain.entity.TMonitor;
import com.ycl.platform.domain.result.HK.SnapshotDataMonitorResult;
import com.ycl.platform.mapper.CheckIndexCarMapper;
import com.ycl.platform.domain.query.DashboardQuery;
import com.ycl.platform.mapper.CheckIndexFaceMapper;
import com.ycl.platform.service.ICheckIndexFaceService;
import com.ycl.platform.service.ITMonitorService;
import com.ycl.system.mapper.SysConfigMapper;
import com.ycl.system.mapper.SysDeptMapper;
import constant.ApiConstants;
import constant.CheckConstants;
import constant.CheckSnapCountConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import utils.DateUtils;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.List;
/**
 * 人脸指标概率数据Service业务层处理
@@ -109,7 +97,8 @@
        return checkIndexFaceMapper.deleteCheckIndexFaceById(id);
    }
    @Override
    public CheckIndexFace dashboard(DashboardQuery dashboardQuery) {
        return checkIndexFaceMapper.dashboard(dashboardQuery);
    }
}
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckIndexVideoServiceImpl.java
@@ -1,9 +1,8 @@
package com.ycl.platform.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ycl.platform.domain.entity.CheckIndexFace;
import com.ycl.platform.domain.entity.CheckIndexVideo;
import com.ycl.platform.mapper.CheckIndexFaceMapper;
import com.ycl.platform.domain.query.DashboardQuery;
import com.ycl.platform.mapper.CheckIndexVideoMapper;
import com.ycl.platform.service.ICheckIndexVideoService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -96,4 +95,9 @@
    {
        return checkIndexVideoMapper.deleteCheckIndexVideoById(id);
    }
    @Override
    public CheckIndexVideo dashboard(DashboardQuery dashboardQuery) {
        return checkIndexVideoMapper.dashboard(dashboardQuery);
    }
}
ycl-server/src/main/resources/mapper/zgyw/CheckIndexCarMapper.xml
@@ -124,4 +124,36 @@
    <select id="selectToday">
        select * from t_check_index_car where DATE(create_time) = #{today}
    </select>
    <select id="dashboard" resultType="com.ycl.platform.domain.entity.CheckIndexCar">
        SELECT
            IFNULL(ROUND(AVG(view_connect_stability * 100), 2), 0) AS view_connect_stability,
            IFNULL(ROUND(AVG(site_online * 100), 2), 0) AS site_online,
            IFNULL(ROUND(AVG(device_directory_consistent * 100), 2), 0) AS device_directory_consistent,
            IFNULL(ROUND(AVG(vehicle_information_collection_accuracy * 100), 2), 0) AS vehicle_information_collection_accuracy,
            IFNULL(ROUND(AVG(vehicle_capture_integrity * 100), 2), 0) AS vehicle_capture_integrity,
            IFNULL(ROUND(AVG(vehicle_capture_accuracy * 100), 2), 0) AS vehicle_capture_accuracy,
            IFNULL(ROUND(AVG(vehicle_timing_accuracy * 100), 2), 0) AS vehicle_timing_accuracy,
            IFNULL(ROUND(AVG(vehicle_upload_timeliness * 100), 2), 0) AS vehicle_upload_timeliness,
            IFNULL(ROUND(AVG(vehicle_url_availability * 100), 2), 0) AS vehicle_url_availability,
            IFNULL(ROUND(AVG(vehicle_picture_availability * 100), 2), 0) AS vehicle_picture_availability
        FROM
            t_check_index_car
        <where>
            <if test="deptId != null">
                AND dept_id = #{deptId}
            </if>
            <if test="dataScope == 1">
                AND examine_tag = 1
            </if>
        </where>
        ORDER BY
            create_time DESC
        <if test="deptId == null">
            LIMIT 7
        </if>
        <if test="deptId != null">
            LIMIT 1
        </if>
    </select>
</mapper>
ycl-server/src/main/resources/mapper/zgyw/CheckIndexFaceMapper.xml
@@ -114,4 +114,34 @@
    <select id="selectToday">
        select * from t_check_index_car where DATE(create_time) = #{today}
    </select>
    <select id="dashboard" resultType="com.ycl.platform.domain.entity.CheckIndexFace">
        SELECT
        IFNULL(ROUND(AVG(view_connect_stability * 100), 2), 0) AS view_connect_stability,
        IFNULL(ROUND(AVG(site_online * 100), 2), 0) AS site_online,
        IFNULL(ROUND(AVG(device_directory_consistent * 100), 2), 0) AS device_directory_consistent,
        IFNULL(ROUND(AVG(face_information_collection_accuracy * 100), 2), 0) AS face_information_collection_accuracy,
        IFNULL(ROUND(AVG(face_picture_qualification * 100), 2), 0) AS face_picture_qualification,
        IFNULL(ROUND(AVG(face_timing_accuracy * 100), 2), 0) AS face_timing_accuracy,
        IFNULL(ROUND(AVG(face_upload_timeliness * 100), 2), 0) AS face_upload_timeliness,
        IFNULL(ROUND(AVG(face_picture_availability * 100), 2), 0) AS face_picture_availability
        FROM
        t_check_index_face
        <where>
            <if test="deptId != null">
                AND dept_id = #{deptId}
            </if>
            <if test="dataScope == 1">
                AND examine_tag = 1
            </if>
        </where>
        ORDER BY
        create_time DESC
        <if test="deptId == null">
            LIMIT 7
        </if>
        <if test="deptId != null">
            LIMIT 1
        </if>
    </select>
</mapper>
ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml
@@ -175,4 +175,47 @@
    <select id="selectToday">
        select * from t_check_index_video where DATE(create_time) = #{today}
    </select>
    <select id="dashboard" resultType="com.ycl.platform.domain.entity.CheckIndexVideo">
        SELECT
        IFNULL(ROUND(AVG(platform_online * 100), 2), 0) AS platform_online,
        IFNULL(ROUND(AVG(monitor_qualification * 100), 2), 0) AS monitor_qualification,
        IFNULL(ROUND(AVG(monitor_registration * 100), 2), 0) AS monitor_registration,
        IFNULL(ROUND(AVG(archives_rate * 100), 2), 0) AS archives_rate,
        IFNULL(ROUND(AVG(site_online * 100), 2), 0) AS site_online,
        IFNULL(ROUND(AVG(video_available * 100), 2), 0) AS video_available,
        IFNULL(ROUND(AVG(annotation_accuracy * 100), 2), 0) AS annotation_accuracy,
        IFNULL(ROUND(AVG(timing_accuracy * 100), 2), 0) AS timing_accuracy,
        IFNULL(ROUND(AVG(key_site_online * 100), 2), 0) AS key_site_online,
        IFNULL(ROUND(AVG(key_video_available * 100), 2), 0) AS key_video_available,
        IFNULL(ROUND(AVG(key_annotation_accuracy * 100), 2), 0) AS key_annotation_accuracy,
        IFNULL(ROUND(AVG(key_timing_accuracy * 100), 2), 0) AS key_timing_accuracy,
        IFNULL(ROUND(AVG(key_command_image_inspection * 100), 2), 0) AS key_command_image_inspection,
        IFNULL(ROUND(AVG(key_command_image_directory_tree * 100), 2), 0) AS key_command_image_directory_tree,
        IFNULL(ROUND(AVG(online_inspection_platform * 100), 2), 0) AS online_inspection_platform,
        IFNULL(ROUND(AVG(video_transmission_assets_accuracy * 100), 2), 0) AS video_transmission_assets_accuracy,
        IFNULL(ROUND(AVG(video_transmission_assets_weak_password_score * 100), 2), 0) AS video_transmission_assets_weak_password_score,
        IFNULL(ROUND(AVG(video_transmission_dangerous_assets_score * 100), 2), 0) AS video_transmission_dangerous_assets_score,
        IFNULL(ROUND(AVG(video_transmission_boundary_integrity_detection * 100), 2), 0) AS video_transmission_boundary_integrity_detection,
        IFNULL(ROUND(AVG(operating_rate * 100), 2), 0) AS operating_rate,
        IFNULL(ROUND(AVG(key_command_image_online * 100), 2), 0) AS key_command_image_online
        FROM
        t_check_index_video
        <where>
            <if test="deptId != null">
                AND dept_id = #{deptId}
            </if>
            <if test="dataScope == 1">
                AND examine_tag = 1
            </if>
        </where>
        ORDER BY
        create_time DESC
        <if test="deptId == null">
            LIMIT 7
        </if>
        <if test="deptId != null">
            LIMIT 1
        </if>
    </select>
</mapper>