From 0a9ed7b7488de66a50799f79369d7806910ae00a Mon Sep 17 00:00:00 2001
From: 郑永安 <zyazyz250@sina.com>
Date: Wed, 23 Aug 2023 15:56:59 +0800
Subject: [PATCH] 隐患二期
---
src/main/java/com/gk/hotwork/Mapper/mybatis/SafetySelfInspectionItemMapper.xml | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetySelfInspectionItemMapper.xml b/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetySelfInspectionItemMapper.xml
index 17d0345..25a9cd8 100644
--- a/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetySelfInspectionItemMapper.xml
+++ b/src/main/java/com/gk/hotwork/Mapper/mybatis/SafetySelfInspectionItemMapper.xml
@@ -20,6 +20,19 @@
<select id="getBySafetySelfInspectionId" resultMap="BaseResultMap">
select * from safety_self_inspection_item where valid_flag = 1 and safety_self_inspection_id=#{safetySelfInspectionId}
</select>
+ <select id="getBySafetySelfInspectionId2" resultType="com.gk.hotwork.Domain.SafetySelfInspectionItem">
+ SELECT
+ ss.* ,
+ si.element_a,
+ si.element_b,
+ si.element_c
+ FROM
+ safety_self_inspection_item ss
+ LEFT JOIN safety_inspection_item si on si.id = ss.safety_inspection_item_id
+ WHERE
+ ss.valid_flag = 1
+ and ss.safety_self_inspection_id = #{safetySelfInspectionId}
+ </select>
<update id="deleteById">
update safety_self_inspection_item set
@@ -36,6 +49,7 @@
b.enterprise_standard AS enterpriseStandard,
b.review_method AS reviewMethod,
b.veto AS veto,
+ b.element_c as elementC,
c.id AS elementA,
c.NAME AS elementAName,
c.weight AS elementAWeight,
@@ -89,6 +103,18 @@
FROM safety_self_inspection_item WHERE valid_flag = 1
</select>
+ <update id="updateBatch">
+ <foreach collection="itemList" item="item" index="index" open="" close="" separator=";">
+ update safety_self_inspection_item
+ set
+ expert_ids=#{item.expertIds},
+ expert_names=#{item.expertNames},
+ update_time=#{item.updateTime},
+ update_by=#{item.updateBy}
+ where id=#{item.id}
+ </foreach>
+
+ </update>
</mapper>
--
Gitblit v1.9.2