Merge remote-tracking branch 'origin/master'
| | |
| | | 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; |
| | |
| | | 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() { |
| | |
| | | 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)); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | 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; |
| | | |
| | |
| | | |
| | | public List<CheckIndexCar> selectToday(String today); |
| | | |
| | | /** |
| | | * 大屏车辆考核 |
| | | * @param dashboardQuery 查询条件 |
| | | * @return 数据 |
| | | */ |
| | | CheckIndexCar dashboard(DashboardQuery dashboardQuery); |
| | | } |
| | |
| | | |
| | | 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; |
| | | |
| | |
| | | |
| | | List<CheckIndexFace> selectToday(String date); |
| | | |
| | | /** |
| | | * 大屏人脸考核 |
| | | * @param dashboardQuery 查询条件 |
| | | * @return 数据 |
| | | */ |
| | | CheckIndexFace dashboard(DashboardQuery dashboardQuery); |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | public int deleteCheckIndexVideoByIds(Long[] ids); |
| | | |
| | | List<CheckIndexVideo> selectToday(String date); |
| | | |
| | | /** |
| | | * 大屏人脸考核 |
| | | * @param dashboardQuery 查询条件 |
| | | * @return 数据 |
| | | */ |
| | | CheckIndexVideo dashboard(DashboardQuery dashboardQuery); |
| | | } |
| | |
| | | |
| | | 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; |
| | | |
| | |
| | | */ |
| | | public int deleteCheckIndexCarById(Long id); |
| | | |
| | | /** |
| | | * 大屏车辆考核 |
| | | * @param dashboardQuery 查询条件 |
| | | * @return 数据 |
| | | */ |
| | | CheckIndexCar dashboard(DashboardQuery dashboardQuery); |
| | | } |
| | |
| | | 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; |
| | | |
| | |
| | | */ |
| | | public int deleteCheckIndexFaceById(Long id); |
| | | |
| | | /** |
| | | * 大屏人脸考核 |
| | | * @param dashboardQuery 查询条件 |
| | | * @return 数据 |
| | | */ |
| | | CheckIndexFace dashboard(DashboardQuery dashboardQuery); |
| | | } |
| | |
| | | |
| | | 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; |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteCheckIndexVideoById(Long id); |
| | | |
| | | /** |
| | | * 大屏视频考核 |
| | | * @param dashboardQuery 查询条件 |
| | | * @return 数据 |
| | | */ |
| | | CheckIndexVideo dashboard(DashboardQuery dashboardQuery); |
| | | } |
| | |
| | | |
| | | 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; |
| | |
| | | public int deleteCheckIndexCarById(Long id) { |
| | | return checkIndexCarMapper.deleteCheckIndexCarById(id); |
| | | } |
| | | |
| | | @Override |
| | | public CheckIndexCar dashboard(DashboardQuery dashboardQuery) { |
| | | return checkIndexCarMapper.dashboard(dashboardQuery); |
| | | } |
| | | } |
| | |
| | | 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业务层处理 |
| | |
| | | return checkIndexFaceMapper.deleteCheckIndexFaceById(id); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public CheckIndexFace dashboard(DashboardQuery dashboardQuery) { |
| | | return checkIndexFaceMapper.dashboard(dashboardQuery); |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | { |
| | | return checkIndexVideoMapper.deleteCheckIndexVideoById(id); |
| | | } |
| | | |
| | | @Override |
| | | public CheckIndexVideo dashboard(DashboardQuery dashboardQuery) { |
| | | return checkIndexVideoMapper.dashboard(dashboardQuery); |
| | | } |
| | | } |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |