From 3b109477ba6bd8dce0f61eb75248e603e584d8af Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期五, 12 九月 2025 10:13:26 +0800
Subject: [PATCH] 功能改造
---
gkhy-system/src/main/resources/mapper/system/DailySafetyInspectionMapper.xml | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/gkhy-system/src/main/resources/mapper/system/DailySafetyInspectionMapper.xml b/gkhy-system/src/main/resources/mapper/system/DailySafetyInspectionMapper.xml
index 937f88f..f1f3115 100644
--- a/gkhy-system/src/main/resources/mapper/system/DailySafetyInspectionMapper.xml
+++ b/gkhy-system/src/main/resources/mapper/system/DailySafetyInspectionMapper.xml
@@ -23,6 +23,7 @@
<result column="create_time" property="createTime" />
<result column="update_by" property="updateBy" />
<result column="update_time" property="updateTime" />
+ <result column="check_type" property="checkType" />
<collection property="dailySafetyInspectionUsers" ofType="com.gkhy.system.domain.DailySafetyInspectionUser" column="id = id" select="selectDailySafetyInspectionUsers" />
@@ -48,9 +49,29 @@
<if test="researchGroup != null ">
and a.research_group = #{researchGroup}
</if>
+ <if test="checkType != null ">
+ and a.check_type = #{checkType}
+ </if>
+ <if test="checkBeginDate != null "><!-- 开始时间检索 -->
+ AND date_format(a.check_date,'%Y%m%d') >= date_format(#{checkBeginDate},'%Y%m%d')
+ </if>
+ <if test="checkEndDate != null "><!-- 结束时间检索 -->
+ AND date_format(a.check_date,'%Y%m%d') <= date_format(#{checkEndDate},'%Y%m%d')
+ </if>
+ <if test="haveMainHazard != null and haveMainHazard == 0 ">
+ and (main_hazard = '无' or main_hazard = ' ')
+ </if>
+ <if test="haveMainHazard != null and haveMainHazard == 1 ">
+ and (main_hazard != '无' and main_hazard != ' ')
+ </if>
<if test="searchCheckUserId != null ">
and a.id in (select daily_safety_inspection_id from daily_safety_inspection_user where check_user_id = #{searchCheckUserId})
</if>
order by a.create_time desc
</select>
+
+
+ <select id="getCheckCount" parameterType="long" resultType="int">
+ select count(*) from daily_safety_inspection where del_flag = 0 and research_group = #{deptId} and date_format(check_date,'%Y%m') = date_format(now(),'%Y%m')
+ </select>
</mapper>
--
Gitblit v1.9.2