From 28f6c716269ce5435b103137dd7ec1f1f9ab19ba Mon Sep 17 00:00:00 2001
From: 16639036659 <577530412@qq.com>
Date: 星期一, 26 六月 2023 09:16:56 +0800
Subject: [PATCH] 临时提交-已经与app端对接完成

---
 src/main/resources/mybatis/doublePrevention/PreventOverhaulMapper.xml |  112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 112 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mybatis/doublePrevention/PreventOverhaulMapper.xml b/src/main/resources/mybatis/doublePrevention/PreventOverhaulMapper.xml
new file mode 100644
index 0000000..719fb49
--- /dev/null
+++ b/src/main/resources/mybatis/doublePrevention/PreventOverhaulMapper.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.ruoyi.doublePrevention.repository.PreventOverhaulLogRepository" >
+
+    <resultMap id="BaseResultMap" type="com.ruoyi.doublePrevention.entity.PreventOverhaulLog">
+        <id column="id" property="id"/>
+        <result column="delete_status" property="deleteStatus" />
+    </resultMap>
+
+
+
+<!--    List<PreventOverhaulLog> selectOverhaulLogPage(@Param("overhaulLogReqBO") PreventOverhaulLogReqBO overhaulLogReqBO);-->
+    <select id="selectOverhaulLogPage" resultType="com.ruoyi.doublePrevention.entity.PreventOverhaulLog">
+        select * from prevent_overhaul_log
+        <where>
+            delete_status = 0
+            <if test="overhaulLogReqBO.hazardCode != null and overhaulLogReqBO.hazardCode != ''">
+                and hazard_code = #{overhaulLogReqBO.hazardCode}
+            </if>
+        </where>
+    </select>
+
+<!--    PreventOverhaulLog getOverhaulLogById(Long id);-->
+    <select id="getOverhaulLogById" resultType="com.ruoyi.doublePrevention.entity.PreventOverhaulLog">
+        select * from prevent_overhaul_log
+        where delete_status = 0 and id = #{id}
+    </select>
+
+<!--    List<PreventOverhaulLog> listReportOverhaulLog();-->
+    <select id="listReportOverhaulLog"  resultType="com.ruoyi.doublePrevention.entity.PreventOverhaulLog">
+        select * from prevent_overhaul_log
+        where report_switch = 0 and delete_status  = 0 and (update_report_data_time > report_time or report_time is null)
+    </select>
+<!--    int savePreventOverhaulLog(PreventOverhaulLog preventOverhaulLog);-->
+    <insert id="savePreventOverhaulLog"  parameterType="com.ruoyi.doublePrevention.entity.PreventOverhaulLog">
+        insert into  prevent_overhaul_log
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="uuid != null ">uuid,</if>
+            <if test="deleteStatus != null ">delete_status,</if>
+            <if test="gmtCreate != null ">gmt_create,</if>
+            <if test="createByUserName != null and createByUserName != '' ">create_by_user_name,</if>
+            <if test="gmtModitify != null ">gmt_moditify,</if>
+            <if test="lastEditUserName != null and lastEditUserName != '' ">last_edit_user_name,</if>
+            <if test="enterpriseId != null and enterpriseId != '' ">enterprise_id,</if>
+            <if test="enterpriseUuid != null and enterpriseUuid != '' ">enterprise_uuid,</if>
+            <if test="reportTime != null ">report_time,</if>
+            <if test="updateReportDataTime != null ">update_report_data_time,</if>
+            <if test="reportStatus != null ">report_status,</if>
+            <if test="reportSwitch != null ">report_switch,</if>
+            <if test="hazardCode != null and hazardCode != '' ">hazard_code,</if>
+            <if test="riskUnitId != null and riskUnitId != '' ">risk_unit_id,</if>
+            <if test="riskUnitUuid != null ">risk_unit_uuid,</if>
+            <if test="stopStartTime != null ">stop_start_time,</if>
+            <if test="stopEndTime != null ">stop_end_time,</if>
+            <if test="stopReason != null ">stop_reason,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="uuid != null ">#{uuid},</if>
+            <if test="deleteStatus != null ">#{deleteStatus},</if>
+            <if test="gmtCreate != null ">#{gmtCreate},</if>
+            <if test="createByUserName != null and createByUserName != '' ">#{createByUserName},</if>
+            <if test="gmtModitify != null ">#{gmtModitify},</if>
+            <if test="lastEditUserName != null and lastEditUserName != '' ">#{lastEditUserName},</if>
+            <if test="enterpriseId != null and enterpriseId != '' ">#{enterpriseId},</if>
+            <if test="enterpriseUuid != null and enterpriseUuid != '' ">#{enterpriseUuid},</if>
+            <if test="reportTime != null ">#{reportTime},</if>
+            <if test="updateReportDataTime != null ">#{updateReportDataTime},</if>
+            <if test="reportStatus != null ">#{reportStatus},</if>
+            <if test="reportSwitch != null ">#{reportSwitch},</if>
+            <if test="hazardCode != null and hazardCode != '' ">#{hazardCode},</if>
+            <if test="riskUnitId != null and riskUnitId != '' ">#{riskUnitId},</if>
+            <if test="riskUnitUuid != null ">#{riskUnitUuid},</if>
+            <if test="stopStartTime != null ">#{stopStartTime},</if>
+            <if test="stopEndTime != null ">#{stopEndTime},</if>
+            <if test="stopReason != null ">#{stopReason},</if>
+        </trim>
+    </insert>
+
+
+<!--    int updateOverhaulLog(PreventOverhaulLogUpdateReqBO updateReqBO);-->
+    <update id="updateOverhaulLog" parameterType="com.ruoyi.doublePrevention.entity.PreventOverhaulLog">
+        update prevent_overhaul_log
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="hazardCode != null  and hazardCode != ''">hazard_code = #{updateReqBO.id},</if>
+            <if test="riskUnitId != null ">risk_unit_id = #{updateReqBO.riskUnitId},</if>
+            <if test="riskUnitUuid != null  and riskUnitUuid != ''">risk_unit_uuid = #{updateReqBO.riskUnitUuid},</if>
+            <if test="stopStartTime != null ">stop_start_time = #{updateReqBO.stopStartTime},</if>
+            <if test="stopEndTime != null ">stop_end_time = #{updateReqBO.stopEndTime},</if>
+            <if test="stopReason != null  and stopReason != ''">stop_reason = #{updateReqBO.stopReason},</if>
+        </trim>
+        where id = #{updateReqBO.id}
+    </update>
+
+<!--    int deleteOverhaulLogByIds(String[] ids);-->
+    <delete id="deleteOverhaulLogByIds" parameterType="String">
+        delete from prevent_overhaul_log where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+
+
+    <!--    int updateOverhaulReportStatus(HandlerReportParam handlerReportParam);-->
+    <update id="updateOverhaulReportStatus" parameterType="com.ruoyi.doublePrevention.entity.PreventOverhaulLog">
+        update prevent_overhaul_log  set
+        report_status =  #{reportStatus},
+        report_time = #{reportTime}
+        where id = #{handlerReportParam.id}
+    </update>
+</mapper>
+

--
Gitblit v1.9.2