双重预防项目-国泰新华二开定制版
16639036659
2024-06-13 7d1e2e5640def6b283f76555681b0a3e62b2a338
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?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>
 
    <!--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>
 
<!--    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
    </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>