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 | 230 +++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 151 insertions(+), 79 deletions(-)
diff --git a/src/main/resources/mybatis/doublePrevention/PreventCJReportDangerInfoMapper.xml b/src/main/resources/mybatis/doublePrevention/PreventCJReportDangerInfoMapper.xml
index 7a79f5a..c2d7dec 100644
--- a/src/main/resources/mybatis/doublePrevention/PreventCJReportDangerInfoMapper.xml
+++ b/src/main/resources/mybatis/doublePrevention/PreventCJReportDangerInfoMapper.xml
@@ -1,79 +1,151 @@
-<?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.PreventCJReportDangerInfoRepository">
-
- <resultMap id="BaseResultMap" type="com.ruoyi.doublePrevention.entity.CJReport.PreventCJReportDangerInfo">
- <id column="index_id" property="indexId"/>
- <result column="id" property="id"/>
- <result column="company_code" property="companyCode"/>
- <result column="deleted" property="deleted"/>
- <result column="create_date" property="createDate"/>
- <result column="create_by" property="createBy"/>
- <result column="update_date" property="updateDate"/>
- <result column="update_by" property="updateBy"/>
- <result column="report_status" property="reportStatus"/>
- <result column="report_time" property="reportTime"/>
- <result column="data_source" property="dataSource"/>
- <result column="hazard_code" property="hazardCode"/>
- <result column="risk_measure_id" property="riskMeasureId"/>
- <result column="check_record_id" property="checkRecordId"/>
- <result column="danger_name" property="dangerName"/>
- <result column="danger_level" property="dangerLevel"/>
- <result column="danger_src" property="dangerSrc"/>
- <result column="danger_manage_type" property="dangerManageType"/>
- <result column="danger_desc" property="dangerDesc"/>
- <result column="danger_reason" property="dangerReason"/>
- <result column="control_measures" property="controlMeasures"/>
- <result column="cost" property="cost"/>
- <result column="danger_manage_deadline" property="dangerManageDeadline"/>
- <result column="danger_state" property="dangerState"/>
- <result column="hazard_danger_type" property="hazardDangerType"/>
- <result column="registrant" property="registrant"/>
- <result column="regist_time" property="registTime"/>
- <result column="liable_person" property="liablePerson"/>
- <result column="check_accept_person" property="checkAcceptPerson"/>
- <result column="check_accept_comment" property="checkAcceptComment"/>
- <result column="check_accept_time" property="checkAcceptTime"/>
- <result column="danger_manager_id" property="dangerManagerId"/>
- </resultMap>
-
- <!--IPage<PreventReportDangerInfo> getReportDangerInfoPage(Page<Object> objectPage, PreventReportDangerInfoReqDTO queryReqDTO);-->
- <select id="getReportDangerInfoPage" resultMap="BaseResultMap">
- select * from prevent_cj_report_danger_info
- order by create_by desc
- </select>
-
- <!-- List<PreventReportDangerInfo> listReportDangerRecordDate();-->
- <select id="listReportDangerDate" resultMap="BaseResultMap">
- select * from prevent_cj_report_danger_info
- where report_status = 1
- limit 200
- </select>
-
- <!--int updateTaskReportStatus(HandlerReportParam handlerReportParam);-->
- <update id="updateTaskReportStatus">
- update prevent_cj_report_danger_info set
- report_status = #{reportStatus},
- report_time = #{reportTime}
- where danger_manager_id = #{id}
- </update>
-
- <!--int updateCJReportStatusById(HandlerCJReportParam handlerCJReportParam);-->
- <update id="updateCJReportStatusById">
- update prevent_cj_report_danger_info set
- report_status = #{reportStatus},
- report_time = #{reportTime}
- where id = #{id}
- </update>
-
-<!-- int insertDangerInfo(PreventCJReportDangerInfo danger);-->
- <insert id="insertDangerInfo">
- insert into prevent_cj_report_danger_info
- values(null, #{id}, #{companyCode}, #{deleted}, #{createDate}, #{createBy}, #{updateDate}, #{updateBy}
- , #{hazardCode}, #{riskMeasureId}, #{checkRecordId}, #{dangerName}, #{dangerLevel}, #{dangerSrc}, #{dangerManageType}
- , #{dangerDesc}, #{dangerReason}, #{controlMeasures}, #{cost}, #{dangerManageDeadline}, #{dangerState}, #{hazardDangerType}
- , #{registrant}, #{registTime}, #{liablePerson}, #{checkAcceptPerson}, #{checkAcceptComment}, #{checkAcceptTime}, #{hazardCategory}
- , #{reportStatus}, #{reportTime}, #{dataSource}, #{dangerManagerId})
- </insert>
-
-</mapper>
+<?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.PreventCJReportDangerInfoRepository">
+
+ <resultMap id="BaseResultMap" type="com.ruoyi.doublePrevention.entity.CJReport.PreventCJReportDangerInfo">
+ <id column="index_id" property="indexId"/>
+ <result column="id" property="id"/>
+ <result column="company_code" property="companyCode"/>
+ <result column="deleted" property="deleted"/>
+ <result column="create_date" property="createDate"/>
+ <result column="create_by" property="createBy"/>
+ <result column="update_date" property="updateDate"/>
+ <result column="update_by" property="updateBy"/>
+ <result column="report_status" property="reportStatus"/>
+ <result column="report_time" property="reportTime"/>
+ <result column="data_source" property="dataSource"/>
+ <result column="hazard_code" property="hazardCode"/>
+ <result column="risk_measure_id" property="riskMeasureId"/>
+ <result column="check_record_id" property="checkRecordId"/>
+ <result column="danger_name" property="dangerName"/>
+ <result column="danger_level" property="dangerLevel"/>
+ <result column="danger_src" property="dangerSrc"/>
+ <result column="danger_manage_type" property="dangerManageType"/>
+ <result column="danger_desc" property="dangerDesc"/>
+ <result column="danger_reason" property="dangerReason"/>
+ <result column="control_measures" property="controlMeasures"/>
+ <result column="cost" property="cost"/>
+ <result column="danger_manage_deadline" property="dangerManageDeadline"/>
+ <result column="danger_state" property="dangerState"/>
+ <result column="hazard_danger_type" property="hazardDangerType"/>
+ <result column="hazard_category" property="hazardCategory"/>
+ <result column="registrant" property="registrant"/>
+ <result column="regist_time" property="registTime"/>
+ <result column="liable_person" property="liablePerson"/>
+ <result column="check_accept_person" property="checkAcceptPerson"/>
+ <result column="check_accept_comment" property="checkAcceptComment"/>
+ <result column="check_accept_time" property="checkAcceptTime"/>
+ <result column="danger_manager_id" property="dangerManagerId"/>
+ </resultMap>
+ <resultMap id="BaseMapVO" type="com.ruoyi.doublePrevention.entity.ZDReport.ZDPreventCJReportDangerInfo" extends="BaseResultMap">
+ <result property="postRectifyPhoto" column="post_rectify_photo"/>
+ <result property="rectifyAttachment" column="rectify_attachment"/>
+ <result property="preRectifyPhoto" column="pre_rectify_photo"/>
+ </resultMap>
+
+ <!--IPage<PreventReportDangerInfo> getReportDangerInfoPage(Page<Object> objectPage, PreventReportDangerInfoReqDTO queryReqDTO);-->
+ <select id="getReportDangerInfoPage" resultMap="BaseResultMap">
+ select * from prevent_cj_report_danger_info
+ order by create_by desc
+ </select>
+
+ <!-- List<PreventReportDangerInfo> listReportDangerRecordDate();-->
+ <select id="listReportDangerDate" resultMap="BaseResultMap">
+ select * from prevent_cj_report_danger_info
+ where report_status = 1
+ limit 200
+ </select>
+
+ <select id="listReportDangerDateZhunDong" resultMap="BaseMapVO">
+<!-- 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 >= a.regist_time
+ limit 10
+ <!-- and a.create_date >= '2025-06-15 00:00:00' and a.create_date <= '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 >= 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 <= 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},
+ zhun_report_time = #{zhunReportTime}
+ where id = #{id}
+ </update>
+
+
+ <!--int updateTaskReportStatus(HandlerReportParam handlerReportParam);-->
+ <update id="updateTaskReportStatus">
+ update prevent_cj_report_danger_info set
+ report_status = #{reportStatus},
+ report_time = #{reportTime}
+ where danger_manager_id = #{id}
+ </update>
+
+ <!--int updateCJReportStatusById(HandlerCJReportParam handlerCJReportParam);-->
+ <update id="updateCJReportStatusById">
+ update prevent_cj_report_danger_info set
+ report_status = #{reportStatus},
+ report_time = #{reportTime}
+ where id = #{id}
+ </update>
+
+<!-- int insertDangerInfo(PreventCJReportDangerInfo danger);-->
+ <insert id="insertDangerInfo">
+ insert into prevent_cj_report_danger_info
+ values(null, #{id}, #{companyCode}, #{deleted}, #{createDate}, #{createBy}, #{updateDate}, #{updateBy}
+ , #{hazardCode}, #{riskMeasureId}, #{checkRecordId}, #{dangerName}, #{dangerLevel}, #{dangerSrc}, #{dangerManageType}
+ , #{dangerDesc}, #{dangerReason}, #{controlMeasures}, #{cost}, #{dangerManageDeadline}, #{dangerState}, #{hazardDangerType}
+ , #{registrant}, #{registTime}, #{liablePerson}, #{checkAcceptPerson}, #{checkAcceptComment}, #{checkAcceptTime}, #{hazardCategory}
+ , #{reportStatus}, #{reportTime}, #{dataSource}, #{dangerManagerId}, #{zhunReportStatus}, #{zhunReportTime})
+ </insert>
+
+<!-- List<PreventCJReportDangerInfo> getDangerListForCheckTask();-->
+ <select id="getDangerListForCheckTask" resultMap="BaseResultMap">
+ select * from prevent_cj_report_danger_info
+ where hazard_code is not null and report_status = 2 and deleted = 0
+ order by create_date desc
+ </select>
+<!-- PreventCJReportDangerInfo getDangetById(String dangerId);-->
+ <select id="getDangerById" resultMap="BaseResultMap">
+ select * from prevent_cj_report_danger_info
+ where deleted = 0 and id = #{dangerId}
+ </select>
+</mapper>
--
Gitblit v1.9.2