From 4fb65d8e3c5fc8ddb8882a355cd31ecb9d51f3d9 Mon Sep 17 00:00:00 2001
From: 16639036659 <577530412@qq.com>
Date: 星期二, 18 六月 2024 15:13:38 +0800
Subject: [PATCH] 评分项内容拆分

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

diff --git a/src/main/resources/mybatis/doublePrevention/PreventRiskControlMeasureMapper.xml b/src/main/resources/mybatis/doublePrevention/PreventRiskControlMeasureMapper.xml
index 5d4235d..59e17f2 100644
--- a/src/main/resources/mybatis/doublePrevention/PreventRiskControlMeasureMapper.xml
+++ b/src/main/resources/mybatis/doublePrevention/PreventRiskControlMeasureMapper.xml
@@ -27,4 +27,185 @@
         <result column="check_content" property="checkContent"/>
     </resultMap>
 
+    <insert id="savePreventRiskControlMeasure" parameterType="com.ruoyi.doublePrevention.entity.PreventRiskControlMeasure">
+        insert into  prevent_risk_control_measure
+        <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="gmtModitify != null ">gmt_moditify,</if>
+            <if test="controlType != null ">control_type,</if>
+            <if test="classify1 != null and classify1 != ''">classify1,</if>
+            <if test="classify2 != null and classify2 != '' ">classify2,</if>
+            <if test="riskEventId != null ">risk_event_id,</if>
+            <if test="enterpriseId != null ">enterprise_id,</if>
+            <if test="riskEventUuid != null ">risk_event_uuid,</if>
+            <if test="enterpriseUuid != null ">enterprise_uuid,</if>
+            <if test="classify3 != null and classify3 != '' ">classify3,</if>
+            <if test="controlMeasureCode != null ">control_measure_code,</if>
+            <if test="createByUserName != null and createByUserName != '' ">create_by_user_name,</if>
+            <if test="lastEditUserName != null and lastEditUserName != '' ">last_edit_user_name,</if>
+            <if test="measureDesc != null and measureDesc != ''  ">measure_desc,</if>
+            <if test="reportStatus != null ">report_status,</if>
+            <if test="reportTime != null ">report_time,</if>
+            <if test="updateReportDataTime != null ">update_report_data_time,</if>
+            <if test="reportSwitch != null ">report_switch,</if>
+            <if test="checkContent != null ">check_content,</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="gmtModitify != null ">#{gmtModitify},</if>
+            <if test="controlType != null ">#{controlType},</if>
+            <if test="classify1 != null and classify1 != ''">#{classify1},</if>
+            <if test="classify2 != null and classify2 != '' ">#{classify2},</if>
+            <if test="riskEventId != null ">#{riskEventId},</if>
+            <if test="enterpriseId != null ">#{enterpriseId},</if>
+            <if test="riskEventUuid != null ">#{riskEventUuid},</if>
+            <if test="enterpriseUuid != null ">#{enterpriseUuid},</if>
+            <if test="classify3 != null and classify3 != '' ">#{classify3},</if>
+            <if test="controlMeasureCode != null ">#{controlMeasureCode},</if>
+            <if test="createByUserName != null and createByUserName != '' ">#{createByUserName},</if>
+            <if test="lastEditUserName != null and lastEditUserName != '' ">#{lastEditUserName},</if>
+            <if test="measureDesc != null and measureDesc != ''  ">#{measureDesc},</if>
+            <if test="reportStatus != null ">#{reportStatus},</if>
+            <if test="reportTime != null ">#{reportTime},</if>
+            <if test="updateReportDataTime != null ">#{updateReportDataTime},</if>
+            <if test="reportSwitch != null ">#{reportSwitch},</if>
+            <if test="checkContent != null ">#{checkContent},</if>
+        </trim>
+    </insert>
+
+
+    <update id="updatePreventRiskControlMeasureById" parameterType="com.ruoyi.doublePrevention.entity.PreventRiskControlMeasure">
+        update prevent_risk_control_measure
+        <set>
+            <if test="gmtModitify != null ">
+                gmt_moditify = #{gmtModitify},
+            </if>
+            <if test="controlType != null">
+                control_type = #{controlType},
+            </if>
+            <if test="classify1 != null">
+                classify1 = #{classify1},
+            </if>
+            <if test="classify2 != null">
+                classify2 = #{classify2},
+            </if>
+            <if test="controlMeasureCode != null">
+                control_measure_code = #{controlMeasureCode},
+            </if>
+            <if test="measureDesc != null">
+                measure_desc = #{measureDesc},
+            </if>
+            <if test="riskEventId != null">
+                risk_event_id = #{riskEventId},
+            </if>
+            <if test="riskEventUuid != null">
+                risk_event_uuid = #{riskEventUuid},
+            </if>
+            <if test="classify3 != null">
+                classify3 = #{classify3},
+            </if>
+            <if test="lastEditUserName != null">
+                last_edit_user_name = #{lastEditUserName},
+            </if>
+            <if test="reportTime != null">
+                report_time = #{reportTime},
+            </if>
+            <if test="updateReportDataTime != null">
+                update_report_data_time = #{updateReportDataTime},
+            </if>
+            <if test="reportStatus != null">
+                report_status = #{reportStatus},
+            </if>
+            <if test="reportSwitch != null">
+                report_switch = #{reportSwitch},
+            </if>
+            <if test="checkContent != null">
+                check_content = #{checkContent},
+            </if>
+        </set>
+        where id = #{id} and delete_status = 0
+    </update>
+
+    <update id="deletePreventRiskControlMeasureById">
+        update prevent_risk_control_measure
+        <set>
+            <if test="gmtModitify != null ">
+                gmt_moditify = #{gmtModitify},
+            </if>
+            <if test="lastEditUserName != null ">
+                last_edit_user_name = #{lastEditUserName},
+            </if>
+            <if test="updateReportDataTime != null">
+                update_report_data_time = #{updateReportDataTime},
+            </if>
+            delete_status = 1 where id = #{id} and delete_status = 0
+        </set>
+    </update>
+
+
+    <select id="getPreventRiskControlMeasureById"
+            resultMap="BaseResultMap">
+        select * from prevent_risk_control_measure
+        where id = #{id} and delete_status = 0
+    </select>
+
+    <select id="getPreventRiskControlMeasureByControlMeasureCode" resultMap="BaseResultMap">
+        select * from prevent_risk_control_measure
+        <where>
+            delete_status = 0
+            <if test="controlMeasureCode != null">
+                and control_measure_code = #{controlMeasureCode}
+            </if>
+        </where>
+    </select>
+
+
+    <select id="listRiskControlMeasureByCondition" resultMap="BaseResultMap">
+        select * from prevent_risk_control_measure
+        <where>
+            delete_status = 0
+            <if test="controlType != null">
+                and control_type = #{controlType}
+            </if>
+            <if test="riskEventId != null">
+                and risk_event_id = #{riskEventId}
+            </if>
+            order by  gmt_moditify desc
+        </where>
+    </select>
+
+    <select id="listRiskControlMeasure" resultMap="BaseResultMap">
+        select * from prevent_risk_control_measure where delete_status = 0
+        order by risk_event_id
+    </select>
+
+    <select id="getPreventRiskControlMeasureByUuid" resultMap="BaseResultMap">
+        select * from prevent_risk_control_measure
+        where delete_status = 0 and uuid = #{riskMeasureId}
+    </select>
+<!--    List<PreventRiskControlMeasure> getAllMeasureList();-->
+    <select id="getAllMeasureList" resultMap="BaseResultMap">
+        select * from prevent_risk_control_measure
+        where delete_status = 0
+    </select>
+
+
+
+<!--    List<PreventRiskControlMeasure> listReportMeasure();-->
+    <select id="listReportMeasure" resultMap="BaseResultMap">
+        select * from prevent_risk_control_measure
+        where report_switch = 0 and delete_status  = 0  and  (update_report_data_time > report_time or report_time is null)
+    </select>
+
+<!--    int updateMeasureReportStatus(HandlerReportParam handlerReportParam);-->
+    <update id="updateMeasureReportStatus" >
+        update prevent_risk_control_measure set
+            report_status =  #{reportStatus},
+            report_time = #{reportTime}
+        where id = #{id}
+    </update>
 </mapper>

--
Gitblit v1.9.2