From 89dbaeded0a13526232d855eac0425708876eb6d Mon Sep 17 00:00:00 2001
From: zf <1603559716@qq.com>
Date: 星期五, 04 八月 2023 16:12:14 +0800
Subject: [PATCH] 调正时间格式

---
 src/main/java/com/gk/hotwork/Mapper/mybatis/InspectionHiddenDangerMapper.xml |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/gk/hotwork/Mapper/mybatis/InspectionHiddenDangerMapper.xml b/src/main/java/com/gk/hotwork/Mapper/mybatis/InspectionHiddenDangerMapper.xml
index c5687f6..4c53600 100644
--- a/src/main/java/com/gk/hotwork/Mapper/mybatis/InspectionHiddenDangerMapper.xml
+++ b/src/main/java/com/gk/hotwork/Mapper/mybatis/InspectionHiddenDangerMapper.xml
@@ -3,6 +3,7 @@
 <mapper namespace="com.gk.hotwork.Mapper.InspectionHiddenDangerMapper" >
      <update id="delByInspectionItemId">
        update inspection_hidden_danger set valid_flag = 0 , update_time = #{inspectionHiddenDanger.updateTime},update_by = #{inspectionHiddenDanger.updateBy}
+        where self_inspection_item_id = #{inspectionHiddenDanger.selfInspectionItemId}
      </update>
 
     <update id="delByIds">
@@ -23,12 +24,12 @@
         (
         SELECT
         t.*,
-        ( CASE WHEN t.unrectifyCount = 0 THEN -1 WHEN t.unrectifyCount = t.hdTocalCount THEN 2 ELSE 1 END ) rectificationStatus
+        ( CASE WHEN t.unRectifyCount = t.hdTocalCount THEN - 1 WHEN t.rectifyCount = t.hdTocalCount THEN 2 ELSE 1 END ) rectificationStatus
         FROM
         (
         SELECT
         s.*,
-        count( h.`status` = -1 OR NULL ) unRectifyCount,
+        count( h.`status` = - 1 OR NULL ) unRectifyCount,
         count( h.`status` = 1 OR NULL ) rectifyCount,
         count( h.`status` ) hdTocalCount,
         count( h.LEVEL = 1 OR NULL ) sameAsCount,
@@ -45,7 +46,8 @@
         ) t
         ) l
         LEFT JOIN company AS co ON l.checked_company_id = co.id
-        where 1=1
+        WHERE
+        1 =1
         <if test="params.inspectionName != null  and params.inspectionName != ''">
             and l.inspection_name like concat("%",#{params.inspectionName},"%")
         </if>
@@ -76,7 +78,7 @@
         <if test="params.area != null and params.area != ''" >
             and co.area = #{params.area}
         </if>
-        ORDER BY l.create_time
+        ORDER BY l.create_time desc
     </select>
     <select id="inspectionHdangerlist" resultType="com.gk.hotwork.Domain.InspectionHiddenDanger">
         SELECT

--
Gitblit v1.9.2