From 9b55891e6dd57bc244e6c5654434b32e05c83496 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 25 九月 2024 15:10:25 +0800
Subject: [PATCH] 异常监控排除已经审核过的工单作为状态

---
 ycl-server/src/main/resources/mapper/zgyw/ImageResourceSecurityMapper.xml |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ycl-server/src/main/resources/mapper/zgyw/ImageResourceSecurityMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/ImageResourceSecurityMapper.xml
index 64ce52b..10404c6 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/ImageResourceSecurityMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/ImageResourceSecurityMapper.xml
@@ -28,7 +28,7 @@
     </sql>
 
     <select id="selectImageResourceSecurityList" resultType="com.ycl.platform.domain.entity.ImageResourceSecurity">
-        select id, a.dept_id, dept_name, platform_online, property_accuracy, weak_password, risk_property, boundary_integrity from t_image_resource_security a
+        select id, a.dept_id, area AS deptName, platform_online, property_accuracy, weak_password, risk_property, boundary_integrity from t_image_resource_security a
         LEFT JOIN sys_dept b ON a.dept_id = b.dept_id AND b.del_flag = 0
         <where>
             <if test="platformOnline != null ">and platform_online = #{platformOnline}</if>
@@ -71,7 +71,7 @@
     <insert id="saveBatch">
         insert into t_image_resource_security (dept_id, platform_online, property_accuracy, weak_password, risk_property, boundary_integrity, create_time) VALUES
         <foreach collection="list" item="item" separator=",">
-            (#{item.deptId}, #{item.platformOnline}, #{item.propertyAccuracy}, #{item.weakPassword}, #{item.riskProperty}, #{item.boundaryIntegrity}, NOW())
+            (#{item.deptId}, #{item.platformOnline}, #{item.propertyAccuracy}, #{item.weakPassword}, #{item.riskProperty}, #{item.boundaryIntegrity}, #{item.createTime})
         </foreach>
     </insert>
 
@@ -101,4 +101,10 @@
             #{id}
         </foreach>
     </delete>
+    <select id="getLatest" resultType="com.ycl.platform.domain.entity.ImageResourceSecurity">
+        select * from t_image_resource_security where dept_id = #{deptId}
+        where date_format(create_time,'%Y-%m')  = DATE_FORMAT(#{date}, '%Y-%m')
+        order by create_time desc
+        limit 1
+    </select>
 </mapper>

--
Gitblit v1.8.0