From 3e9a6da99aae968123ee7bca352fc08becd7f1f2 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 29 八月 2024 17:29:21 +0800
Subject: [PATCH] 工单过程图接口更换
---
ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml | 113 +++++++++++++++++++++++++-------------------------------
1 files changed, 50 insertions(+), 63 deletions(-)
diff --git a/ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml
index c5f1d1c..1c42656 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/CheckIndexVideoMapper.xml
@@ -21,18 +21,12 @@
<result property="keyVideoAvailable" column="key_video_available" />
<result property="keyAnnotationAccuracy" column="key_annotation_accuracy" />
<result property="keyTimingAccuracy" column="key_timing_accuracy" />
- <result property="keyCommandImageInspection" column="key_command_image_inspection" />
- <result property="keyCommandImageDirectoryTree" column="key_command_image_directory_tree" />
- <result property="onlineInspectionPlatform" column="online_inspection_platform" />
- <result property="videoTransmissionAssetsAccuracy" column="video_transmission_assets_accuracy" />
- <result property="videoTransmissionAssetsWeakPasswordScore" column="video_transmission_assets_weak_password_score" />
- <result property="videoTransmissionDangerousAssetsScore" column="video_transmission_dangerous_assets_score" />
- <result property="videoTransmissionBoundaryIntegrityDetection" column="video_transmission_boundary_integrity_detection" />
- <result property="operatingRate" column="operating_rate" />
+ <result property="keyCommandImageOnline" column="key_command_image_online" />
+ <result property="imageResourceSecurity" column="image_resource_security" />
</resultMap>
<sql id="selectCheckIndexVideoVo">
- select id, dept_id, create_time, examine_tag, platform_online, monitor_qualification, monitor_registration, archives_rate, site_online, video_available, annotation_accuracy, timing_accuracy, key_site_online, key_video_available, key_annotation_accuracy, key_timing_accuracy, key_command_image_inspection, key_command_image_directory_tree, online_inspection_platform, video_transmission_assets_accuracy, video_transmission_assets_weak_password_score, video_transmission_dangerous_assets_score, video_transmission_boundary_integrity_detection, operating_rate from t_check_index_video
+ select id, dept_id, create_time, examine_tag, platform_online, monitor_qualification, monitor_registration, archives_rate, site_online, video_available, annotation_accuracy, timing_accuracy, key_site_online, key_video_available, key_annotation_accuracy, key_timing_accuracy, key_command_image_online,image_resource_security from t_check_index_video
</sql>
<select id="selectCheckIndexVideoList" parameterType="CheckIndexVideo" resultMap="CheckIndexVideoResult">
@@ -56,14 +50,8 @@
<if test="keyVideoAvailable != null "> and key_video_available = #{keyVideoAvailable}</if>
<if test="keyAnnotationAccuracy != null "> and key_annotation_accuracy = #{keyAnnotationAccuracy}</if>
<if test="keyTimingAccuracy != null "> and key_timing_accuracy = #{keyTimingAccuracy}</if>
- <if test="keyCommandImageInspection != null "> and key_command_image_inspection = #{keyCommandImageInspection}</if>
- <if test="keyCommandImageDirectoryTree != null "> and key_command_image_directory_tree = #{keyCommandImageDirectoryTree}</if>
- <if test="onlineInspectionPlatform != null "> and online_inspection_platform = #{onlineInspectionPlatform}</if>
- <if test="videoTransmissionAssetsAccuracy != null "> and video_transmission_assets_accuracy = #{videoTransmissionAssetsAccuracy}</if>
- <if test="videoTransmissionAssetsWeakPasswordScore != null "> and video_transmission_assets_weak_password_score = #{videoTransmissionAssetsWeakPasswordScore}</if>
- <if test="videoTransmissionDangerousAssetsScore != null "> and video_transmission_dangerous_assets_score = #{videoTransmissionDangerousAssetsScore}</if>
- <if test="videoTransmissionBoundaryIntegrityDetection != null "> and video_transmission_boundary_integrity_detection = #{videoTransmissionBoundaryIntegrityDetection}</if>
- <if test="operatingRate != null "> and operating_rate = #{operatingRate}</if>
+ <if test="keyCommandImageOnline != null "> and key_command_image_online = #{keyCommandImageOnline}</if>
+ <if test="imageResourceSecurity != null "> and image_resource_security = #{imageResourceSecurity}</if>
<if test="deptIds != null ">and tciv.dept_id in
<foreach collection="deptIds" separator="," open="(" close=")" item="deptId">
#{deptId}
@@ -95,15 +83,9 @@
<if test="keyVideoAvailable != null">key_video_available,</if>
<if test="keyAnnotationAccuracy != null">key_annotation_accuracy,</if>
<if test="keyTimingAccuracy != null">key_timing_accuracy,</if>
- <if test="keyCommandImageInspection != null">key_command_image_inspection,</if>
- <if test="keyCommandImageDirectoryTree != null">key_command_image_directory_tree,</if>
- <if test="onlineInspectionPlatform != null">online_inspection_platform,</if>
- <if test="videoTransmissionAssetsAccuracy != null">video_transmission_assets_accuracy,</if>
- <if test="videoTransmissionAssetsWeakPasswordScore != null">video_transmission_assets_weak_password_score,</if>
- <if test="videoTransmissionDangerousAssetsScore != null">video_transmission_dangerous_assets_score,</if>
- <if test="videoTransmissionBoundaryIntegrityDetection != null">video_transmission_boundary_integrity_detection,</if>
- <if test="operatingRate != null">operating_rate,</if>
- </trim>
+ <if test="keyCommandImageOnline != null">key_command_image_online,</if>
+ <if test="imageResourceSecurity != null">image_resource_security,</if>
+ </trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if>
<if test="createTime != null">#{createTime},</if>
@@ -120,14 +102,8 @@
<if test="keyVideoAvailable != null">#{keyVideoAvailable},</if>
<if test="keyAnnotationAccuracy != null">#{keyAnnotationAccuracy},</if>
<if test="keyTimingAccuracy != null">#{keyTimingAccuracy},</if>
- <if test="keyCommandImageInspection != null">#{keyCommandImageInspection},</if>
- <if test="keyCommandImageDirectoryTree != null">#{keyCommandImageDirectoryTree},</if>
- <if test="onlineInspectionPlatform != null">#{onlineInspectionPlatform},</if>
- <if test="videoTransmissionAssetsAccuracy != null">#{videoTransmissionAssetsAccuracy},</if>
- <if test="videoTransmissionAssetsWeakPasswordScore != null">#{videoTransmissionAssetsWeakPasswordScore},</if>
- <if test="videoTransmissionDangerousAssetsScore != null">#{videoTransmissionDangerousAssetsScore},</if>
- <if test="videoTransmissionBoundaryIntegrityDetection != null">#{videoTransmissionBoundaryIntegrityDetection},</if>
- <if test="operatingRate != null">#{operatingRate},</if>
+ <if test="keyCommandImageOnline != null">#{keyCommandImageOnline},</if>
+ <if test="imageResourceSecurity != null">#{imageResourceSecurity},</if>
</trim>
</insert>
@@ -149,14 +125,8 @@
<if test="keyVideoAvailable != null">key_video_available = #{keyVideoAvailable},</if>
<if test="keyAnnotationAccuracy != null">key_annotation_accuracy = #{keyAnnotationAccuracy},</if>
<if test="keyTimingAccuracy != null">key_timing_accuracy = #{keyTimingAccuracy},</if>
- <if test="keyCommandImageInspection != null">key_command_image_inspection = #{keyCommandImageInspection},</if>
- <if test="keyCommandImageDirectoryTree != null">key_command_image_directory_tree = #{keyCommandImageDirectoryTree},</if>
- <if test="onlineInspectionPlatform != null">online_inspection_platform = #{onlineInspectionPlatform},</if>
- <if test="videoTransmissionAssetsAccuracy != null">video_transmission_assets_accuracy = #{videoTransmissionAssetsAccuracy},</if>
- <if test="videoTransmissionAssetsWeakPasswordScore != null">video_transmission_assets_weak_password_score = #{videoTransmissionAssetsWeakPasswordScore},</if>
- <if test="videoTransmissionDangerousAssetsScore != null">video_transmission_dangerous_assets_score = #{videoTransmissionDangerousAssetsScore},</if>
- <if test="videoTransmissionBoundaryIntegrityDetection != null">video_transmission_boundary_integrity_detection = #{videoTransmissionBoundaryIntegrityDetection},</if>
- <if test="operatingRate != null">operating_rate = #{operatingRate},</if>
+ <if test="keyCommandImageOnline != null">key_command_image_online = #{keyCommandImageOnline},</if>
+ <if test="imageResourceSecurity != null">image_resource_security = #{imageResourceSecurity},</if>
</trim>
where id = #{id}
</update>
@@ -178,27 +148,20 @@
<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
+ IFNULL(ROUND(AVG(platform_online * 100), 0), 0) AS platform_online,
+ IFNULL(ROUND(AVG(monitor_qualification * 100), 0), 0) AS monitor_qualification,
+ IFNULL(ROUND(AVG(monitor_registration * 100), 0), 0) AS monitor_registration,
+ IFNULL(ROUND(AVG(archives_rate * 100), 0), 0) AS archives_rate,
+ IFNULL(ROUND(AVG(site_online * 100), 0), 0) AS site_online,
+ IFNULL(ROUND(AVG(video_available * 100), 0), 0) AS video_available,
+ IFNULL(ROUND(AVG(annotation_accuracy * 100), 0), 0) AS annotation_accuracy,
+ IFNULL(ROUND(AVG(timing_accuracy * 100), 0), 0) AS timing_accuracy,
+ IFNULL(ROUND(AVG(key_site_online * 100), 0), 0) AS key_site_online,
+ IFNULL(ROUND(AVG(key_video_available * 100), 0), 0) AS key_video_available,
+ IFNULL(ROUND(AVG(key_annotation_accuracy * 100), 0), 0) AS key_annotation_accuracy,
+ IFNULL(ROUND(AVG(key_timing_accuracy * 100), 0), 0) AS key_timing_accuracy,
+ IFNULL(ROUND(AVG(key_command_image_online * 100), 0), 0) AS key_command_image_online,
+ IFNULL(ROUND(AVG(image_resource_security * 100), 0), 0) AS image_resource_security
FROM
t_check_index_video
<where>
@@ -218,4 +181,28 @@
LIMIT 1
</if>
</select>
+
+ <select id="selectAndDeptName" resultType="com.ycl.platform.domain.entity.CheckIndexVideo">
+ WITH temp AS (
+ SELECT
+ r.dept_id,
+ r.platform_online,
+ r.monitor_qualification,
+ d.area,
+ ROW_NUMBER() OVER(PARTITION BY r.dept_id ORDER BY r.create_time DESC) AS rn
+ FROM
+ t_check_index_video r
+ JOIN
+ sys_dept d ON r.dept_id = d.dept_id
+ )
+ SELECT
+ dept_id,
+ area as deptName,
+ platform_online,
+ monitor_qualification
+ FROM
+ temp
+ WHERE
+ rn = 1;
+ </select>
</mapper>
--
Gitblit v1.8.0