From 2b67ed2da39eba5824cfee7950e03be2c1a256ec Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期一, 20 十月 2025 13:17:04 +0800
Subject: [PATCH] 新增数据上传准东

---
 src/main/resources/mybatis/tr/TbSpecialCheckScoreAndDangerLogMapper.xml |  260 +++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 187 insertions(+), 73 deletions(-)

diff --git a/src/main/resources/mybatis/tr/TbSpecialCheckScoreAndDangerLogMapper.xml b/src/main/resources/mybatis/tr/TbSpecialCheckScoreAndDangerLogMapper.xml
index 5f71865..6158cc5 100644
--- a/src/main/resources/mybatis/tr/TbSpecialCheckScoreAndDangerLogMapper.xml
+++ b/src/main/resources/mybatis/tr/TbSpecialCheckScoreAndDangerLogMapper.xml
@@ -1,9 +1,8 @@
 <?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">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.tr.specialCheck.mapper.TbSpecialCheckScoreAndDangerLogMapper">
-
     <resultMap id="BaseResultMap" type="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog">
         <id property="indexId" column="index_id"/>
         <result property="id" column="id"/>
@@ -32,7 +31,7 @@
     </resultMap>
 
 
-<!--    List<TbSpecialCheckItemDangerLog> selectSpecialCheckScoreAndDangerLogPage(TbSpecialCheckItemDangerLogBO itemDangerLogBO);-->
+    <!--    List<TbSpecialCheckItemDangerLog> selectSpecialCheckScoreAndDangerLogPage(TbSpecialCheckItemDangerLogBO itemDangerLogBO);-->
     <select id="selectSpecialCheckScoreAndDangerLogPage" resultMap="BaseResultMap">
         select * from tb_special_check_score_and_danger_log
         <where>
@@ -44,78 +43,161 @@
                 and check_type like concat('%',#{checkType},'%')
             </if>
             <if test="reportStatus != null">
-            and report_status = #{reportStatus}
+                and report_status = #{reportStatus}
             </if>
-            order by  create_date desc
+            order by create_date desc
         </where>
     </select>
-<!--    TbSpecialCheckItemDangerLog getSpecialCheckScoreAndDangerLogByIndexId(Long indexId);;-->
+    <!--    TbSpecialCheckItemDangerLog getSpecialCheckScoreAndDangerLogByIndexId(Long indexId);;-->
     <select id="getSpecialCheckScoreAndDangerLogByIndexId" resultMap="BaseResultMap">
-        select * from tb_special_check_score_and_danger_log
-        where deleted = 0 and index_id = #{indexId}
+        select *
+        from tb_special_check_score_and_danger_log
+        where deleted = 0
+          and index_id = #{indexId}
     </select>
 
-<!--    TbSpecialCheckTaskLog save(TbSpecialCheckTaskLog tbSpecialCheckTaskLog);-->
+    <!--    TbSpecialCheckTaskLog save(TbSpecialCheckTaskLog tbSpecialCheckTaskLog);-->
     <insert id="save" parameterType="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog">
         insert into tb_special_check_score_and_danger_log
-<!--        (index_id,company_code)values(null,#{companyCode},#{hazardCode})-->
+        <!--        (index_id,company_code)values(null,#{companyCode},#{hazardCode})-->
         <trim prefix="(" suffix=")" suffixOverrides=",">
             index_id,
-            <if test="id != null ">id,</if>
-            <if test="companyCode != null ">company_code,</if>
+            <if test="id != null ">
+                id,
+            </if>
+            <if test="companyCode != null ">
+                company_code,
+            </if>
 
-            <if test="dangerId != null ">danger_id,</if>
-            <if test="dangerName != null ">danger_name,</if>
-            <if test="taskId != null ">task_id,</if>
-            <if test="checkType != null ">check_type,</if>
-            <if test="checkItemId != null ">check_item_id,</if>
-            <if test="checkScoreId != null ">check_score_id,</if>
-            <if test="checkDate != null ">check_date,</if>
+            <if test="dangerId != null ">
+                danger_id,
+            </if>
+            <if test="dangerName != null ">
+                danger_name,
+            </if>
+            <if test="taskId != null ">
+                task_id,
+            </if>
+            <if test="checkType != null ">
+                check_type,
+            </if>
+            <if test="checkItemId != null ">
+                check_item_id,
+            </if>
+            <if test="checkScoreId != null ">
+                check_score_id,
+            </if>
+            <if test="checkDate != null ">
+                check_date,
+            </if>
 
-            <if test="checkPay != null ">check_pay,</if>
-            <if test="harmType != null ">harm_type,</if>
-            <if test="isReject != null ">is_reject,</if>
-            <if test="deductPoint != null ">deduct_point,</if>
-            <if test="deductIllustrate != null ">deduct_illustrate,</if>
+            <if test="checkPay != null ">
+                check_pay,
+            </if>
+            <if test="harmType != null ">
+                harm_type,
+            </if>
+            <if test="isReject != null ">
+                is_reject,
+            </if>
+            <if test="deductPoint != null ">
+                deduct_point,
+            </if>
+            <if test="deductIllustrate != null ">
+                deduct_illustrate,
+            </if>
 
-            <if test="deleted != null">deleted,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createDate != null">create_date,</if>
-            <if test="updateBy != null ">update_by,</if>
-            <if test="updateDate != null ">update_date,</if>
+            <if test="deleted != null">
+                deleted,
+            </if>
+            <if test="createBy != null">
+                create_by,
+            </if>
+            <if test="createDate != null">
+                create_date,
+            </if>
+            <if test="updateBy != null ">
+                update_by,
+            </if>
+            <if test="updateDate != null ">
+                update_date,
+            </if>
             report_time,
-            <if test="reportStatus != null ">report_status,</if>
+            <if test="reportStatus != null ">
+                report_status,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             null,
-            <if test="id != null ">#{id},</if>
-            <if test="companyCode != null ">#{companyCode},</if>
+            <if test="id != null ">
+                #{id},
+            </if>
+            <if test="companyCode != null ">
+                #{companyCode},
+            </if>
 
-            <if test="dangerId != null ">#{dangerId},</if>
-            <if test="dangerName != null ">#{dangerName},</if>
-            <if test="taskId != null ">#{taskId},</if>
-            <if test="checkType != null ">#{checkType},</if>
-            <if test="checkItemId != null ">#{checkItemId},</if>
-            <if test="checkScoreId != null ">#{checkScoreId},</if>
-            <if test="checkDate != null">#{checkDate},</if>
-            <if test="checkPay != null ">#{checkPay},</if>
-            <if test="harmType != null ">#{harmType},</if>
-            <if test="isReject != null ">#{isReject},</if>
-            <if test="deductPoint != null ">#{deductPoint},</if>
-            <if test="deductIllustrate != null ">#{deductIllustrate},</if>
+            <if test="dangerId != null ">
+                #{dangerId},
+            </if>
+            <if test="dangerName != null ">
+                #{dangerName},
+            </if>
+            <if test="taskId != null ">
+                #{taskId},
+            </if>
+            <if test="checkType != null ">
+                #{checkType},
+            </if>
+            <if test="checkItemId != null ">
+                #{checkItemId},
+            </if>
+            <if test="checkScoreId != null ">
+                #{checkScoreId},
+            </if>
+            <if test="checkDate != null">
+                #{checkDate},
+            </if>
+            <if test="checkPay != null ">
+                #{checkPay},
+            </if>
+            <if test="harmType != null ">
+                #{harmType},
+            </if>
+            <if test="isReject != null ">
+                #{isReject},
+            </if>
+            <if test="deductPoint != null ">
+                #{deductPoint},
+            </if>
+            <if test="deductIllustrate != null ">
+                #{deductIllustrate},
+            </if>
 
-            <if test="deleted != null ">#{deleted},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createDate != null">#{createDate},</if>
-            <if test="updateBy != null ">#{updateBy},</if>
-            <if test="updateDate != null ">#{updateDate},</if>
+            <if test="deleted != null ">
+                #{deleted},
+            </if>
+            <if test="createBy != null">
+                #{createBy},
+            </if>
+            <if test="createDate != null">
+                #{createDate},
+            </if>
+            <if test="updateBy != null ">
+                #{updateBy},
+            </if>
+            <if test="updateDate != null ">
+                #{updateDate},
+            </if>
             null,
-            <if test="reportStatus != null ">#{reportStatus},</if>
+            <if test="reportStatus != null ">
+                #{reportStatus},
+            </if>
         </trim>
     </insert>
 
-<!-- int updateSpecialCheckScoreAndDangerLogById(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog);-->
-    <update id="updateSpecialCheckScoreAndDangerLogById" parameterType="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog">
+    <!-- int updateSpecialCheckScoreAndDangerLogById(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog);-->
+    <update id="updateSpecialCheckScoreAndDangerLogById"
+            parameterType="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog">
         update tb_special_check_score_and_danger_log
         <set>
             <if test="dangerId != null ">
@@ -158,7 +240,7 @@
                 report_status = #{reportStatus},
             </if>
             <if test="updateBy != null">
-                update_by  = #{updateBy},
+                update_by = #{updateBy},
             </if>
             <if test="updateDate != null">
                 update_date = #{updateDate},
@@ -167,8 +249,9 @@
         where index_id = #{indexId} and deleted = 0
     </update>
 
-<!--    int deleteTbSpecialCheckScoreAndDangerLog(TbSpecialCheckItemDangerLog tbSpecialCheckItemDangerLog);-->
-    <update id="deleteTbSpecialCheckScoreAndDangerLog" parameterType="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog">
+    <!--    int deleteTbSpecialCheckScoreAndDangerLog(TbSpecialCheckItemDangerLog tbSpecialCheckItemDangerLog);-->
+    <update id="deleteTbSpecialCheckScoreAndDangerLog"
+            parameterType="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog">
         update tb_special_check_score_and_danger_log
         <set>
             <if test="deleted != null ">
@@ -178,35 +261,66 @@
                 report_status = #{reportStatus},
             </if>
             <if test="updateBy != null">
-                update_by  = #{updateBy},
+                update_by = #{updateBy},
             </if>
             <if test="updateDate != null">
                 update_date = #{updateDate},
             </if>
         </set>
-        where index_id = #{indexId}  and deleted = 0
+        where index_id = #{indexId} and deleted = 0
     </update>
-<!--    List<TbSpecialCheckItemDangerLog> listItemDangerReportTask();-->
+    <!--    List<TbSpecialCheckItemDangerLog> listItemDangerReportTask();-->
     <select id="listItemDangerReportTask" resultMap="BaseResultMap">
-        select * from tb_special_check_score_and_danger_log
-        where deleted = 0 and report_status = 1
+        select *
+        from tb_special_check_score_and_danger_log
+        where deleted = 0
+          and report_status = 1
     </select>
-<!--    void updateItemDangerReportStatusById(HandlerSpecialCheckReportParam handlerCJReportParam);-->
-    <update id="updateItemDangerReportStatusById" >
-        update tb_special_check_score_and_danger_log set
-            report_status =  #{reportStatus},
-            report_time = #{reportTime}
-        where id = #{id}  and deleted = 0
+    <!--    void updateItemDangerReportStatusById(HandlerSpecialCheckReportParam handlerCJReportParam);-->
+    <update id="updateItemDangerReportStatusById">
+        update tb_special_check_score_and_danger_log
+        set report_status = #{reportStatus},
+            report_time   = #{reportTime}
+        where id = #{id}
+          and deleted = 0
     </update>
-<!--    TbSpecialCheckItemDangerLog getSpecialCheckScoreAndDangerLogById(String id);-->
+    <!--    TbSpecialCheckItemDangerLog getSpecialCheckScoreAndDangerLogById(String id);-->
     <select id="getSpecialCheckScoreAndDangerLogById" resultMap="BaseResultMap">
-        select * from tb_special_check_score_and_danger_log
-        where deleted = 0 and id = #{id}
+        select *
+        from tb_special_check_score_and_danger_log
+        where deleted = 0
+          and id = #{id}
     </select>
-<!--    List<TbSpecialCheckScoreAndDangerLog> listScoreAndDangerLogReportList();-->
+    <!--    List<TbSpecialCheckScoreAndDangerLog> listScoreAndDangerLogReportList();-->
     <select id="listScoreAndDangerLogReportList" resultMap="BaseResultMap">
-        select * from tb_special_check_score_and_danger_log
-        where deleted = 0 and report_status = 1
+        select *
+        from tb_special_check_score_and_danger_log
+        where deleted = 0
+          and report_status = 1
     </select>
 
+
+    <update id="updateEventReportStatusZhunDong">
+        update tb_special_check_score_and_danger_log
+        set zhun_report_status = #{zhunReportStatus},
+            zhun_report_time   = #{zhunReportTime}
+        where id = #{id}
+    </update>
+
+    <update id="updateEventReportStatusZhunDongSp">
+        update tb_special_check_score_and_danger_log
+        set zhun_report_status = 8,
+            zhun_report_time   = #{zhunReportTime}
+        where danger_id = #{id}
+    </update>
+
+
+    <select id="listCheckDangerList" resultMap="BaseResultMap">
+        SELECT a.*
+        FROM tb_special_check_score_and_danger_log a
+                 INNER JOIN prevent_cj_report_danger_info b
+                            on a.danger_id = b.id and b.deleted = 0 and b.zhun_report_status = 2
+        where a.deleted = 0 and a.report_status = 1
+        limit 20
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.2