From 037e91db7dee12aa1adc666601d890a58ca2e2ab Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期四, 20 十一月 2025 16:08:14 +0800
Subject: [PATCH] 新增数据上传准东单独业务处理

---
 src/main/resources/mybatis/doublePrevention/PreventCJReportDangerInfoMapper.xml |   42 ++++++++++++++++++++++++++++++++++++++----
 1 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/src/main/resources/mybatis/doublePrevention/PreventCJReportDangerInfoMapper.xml b/src/main/resources/mybatis/doublePrevention/PreventCJReportDangerInfoMapper.xml
index 49bb54d..c2d7dec 100644
--- a/src/main/resources/mybatis/doublePrevention/PreventCJReportDangerInfoMapper.xml
+++ b/src/main/resources/mybatis/doublePrevention/PreventCJReportDangerInfoMapper.xml
@@ -62,13 +62,47 @@
 <!--            limit 50-->
 <!--,c.pre_rectify_photo,c.post_rectify_photo,c.rectify_attachment-->
         select a.* ,c.pre_rectify_photo,c.post_rectify_photo,c.rectify_attachment from prevent_cj_report_danger_info a
-        INNER JOIN prevent_risk_danger_info b on  a.id = b.uuid
-        INNER JOIN tr_hidden_danger_check_point c on c.id = b.danger_check_point_id
+        left JOIN prevent_risk_danger_info b on  a.id = b.uuid
+        left JOIN tr_hidden_danger_check_point c on c.id = b.danger_check_point_id
         where a.zhun_report_status = 1 and a.deleted = 0 and a.danger_manage_deadline &gt;= a.regist_time
-<!--        and a.create_date &gt;= '2025-06-15 00:00:00' and a.create_date &lt;= '2025-06-18 23:59:59'-->
-        limit 50
+        limit 10
+        <!--        and a.create_date &gt;= '2025-06-15 00:00:00' and a.create_date &lt;= '2025-06-18 23:59:59'-->
     </select>
 
+
+    <select id="listReportDangerDateZhunDongSp" resultMap="BaseMapVO" parameterType="int">
+        <!--        select * from prevent_cj_report_danger_info-->
+        <!--        where zhun_report_status = 1-->
+        <!--            limit 50-->
+        <!--,c.pre_rectify_photo,c.post_rectify_photo,c.rectify_attachment-->
+        select a.* ,c.pre_rectify_photo,c.post_rectify_photo,c.rectify_attachment from prevent_cj_report_danger_info a
+        left JOIN prevent_risk_danger_info b on  a.id = b.uuid
+        left JOIN tr_hidden_danger_check_point c on c.id = b.danger_check_point_id
+        where a.zhun_report_status = 1 and a.deleted = 0 and a.danger_manage_deadline &gt;= a.regist_time
+        <if test="indexId != null">
+            and a.index_id = #{indexId}
+        </if>
+        <if test="indexId == null">
+            limit 10
+        </if>
+
+    </select>
+
+    <update id="updateErrorZDdata">
+        update prevent_cj_report_danger_info set
+        zhun_report_status =  5
+        where zhun_report_status = 1 and deleted = 0 and danger_manage_deadline &lt;= regist_time
+    </update>
+
+
+    <!--todo ???-->
+<!--    <select id="listZDOtherState" resultMap="">-->
+<!--        select b.uuid as id from prevent_risk_danger_info b-->
+<!--        INNER JOIN tr_hidden_danger_check_point c on c.id = b.danger_check_point_id-->
+<!--        where b.report_switch = 0 and (b.update_report_data_time > b.report_time or b.report_time is null) and (b.hazard_code !='' or b.hazard_code != null) and b.danger_state in (0,1)-->
+<!--    </select>-->
+
+
     <update id="updateZDReportStatusById">
         update prevent_cj_report_danger_info set
                                                  zhun_report_status =  #{zhunReportStatus},

--
Gitblit v1.9.2