双重预防项目-国泰新华二开定制版
heheng
2025-06-24 e98eeaaa5766511fdb8e6d5e412eb1c59d1f07ce
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<?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.project.tr.troubleshootList.mapper.TroubleshootListMapper">
    
    <resultMap type="TroubleshootList" id="TroubleshootListResult">
        <result property="troubleshootId"    column="troubleshoot_id"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="remark"    column="remark"    />
        <result property="troubleshootName"    column="troubleshoot_name"    />
        <result property="troubleshootType"    column="troubleshoot_type"    />
        <result property="troubleshootDept"    column="troubleshoot_dept"    />
        <result property="troubleshootRistId"    column="troubleshoot_rist_id"    />
        <result property="troubleshootCheckUserId"    column="troubleshoot_check_user_id"    />
        <result property="troubleshootCheckedDeptId"    column="troubleshoot_checked_dept_id"    />
        <result property="troubleshootBiginTime"    column="troubleshoot_bigin_time"    />
        <result property="troubleshootEndTime"    column="troubleshoot_end_time"    />
        <result property="troubleshootDistributeStatus"    column="troubleshoot_distribute_status"    />
        <result property="troubleshootStatus"    column="troubleshoot_status"    />
        <result property="troubleshootTroubleName"    column="troubleshoot_trouble_name"    />
        <result property="troubleshootTroubleDescription"    column="troubleshoot_trouble_description"    />
        <result property="troubleshootTroubleLevel"    column="troubleshoot_trouble_level"    />
        <result property="troubleshootTroubleType"    column="troubleshoot_trouble_type"    />
        <result property="troubleshootTroubleDept"    column="troubleshoot_trouble_dept"    />
        <result property="troubleshootTroubleAddress"    column="troubleshoot_trouble_address"    />
        <result property="troubleshootTime"    column="troubleshoot_time"    />
        <result property="troubleshootBeforeChangeImageUrl"    column="troubleshoot_before_change_image_url"    />
        <result property="troubleshootReviewUserId"    column="troubleshoot_review_user_id"    />
        <result property="troubleshootRectificationUserId"    column="troubleshoot_rectification_user_id"    />
        <result property="hiddenTroubleType"    column="hidden_trouble_type"    />
        <result property="hiddenTroubleStatus"    column="hidden_trouble_status"    />
        <result property="troubleshootRectificationMeasures"    column="troubleshoot_rectification_measures"    />
        <result property="troubleshootRectificationHappening"    column="troubleshoot_rectification_happening"    />
        <result property="troubleshootRectificationMoney"    column="troubleshoot_rectification_money"    />
        <result property="troubleshootRectificationCompleteTime"    column="troubleshoot_rectification_complete_time"    />
        <result property="troubleshootAcceptanceUserId"    column="troubleshoot_acceptance_user_id"    />
        <result property="troubleshootAfterChangeImageUrl"    column="troubleshoot_after_change_image_url"    />
        <result property="troubleshootAcceptanceOpinion"    column="troubleshoot_acceptance_opinion"    />
        <result property="troubleshootAcceptanceResult"    column="troubleshoot_acceptance_result"    />
        <result property="troubleshootAcceptanceImageUrl"    column="troubleshoot_acceptance_image_url"    />
        <result property="troubleshootProgress"    column="troubleshoot_progress"    />
    </resultMap>
 
    <sql id="selectTroubleshootListVo">
        select troubleshoot_id, create_by, create_time, update_by, update_time, remark, troubleshoot_name, troubleshoot_type, troubleshoot_dept, troubleshoot_rist_id, troubleshoot_check_user_id, troubleshoot_checked_dept_id, troubleshoot_bigin_time, troubleshoot_end_time, troubleshoot_distribute_status, troubleshoot_status, troubleshoot_trouble_name, troubleshoot_trouble_description, troubleshoot_trouble_level, troubleshoot_trouble_type, troubleshoot_trouble_dept, troubleshoot_trouble_address, troubleshoot_time, troubleshoot_before_change_image_url, troubleshoot_review_user_id, troubleshoot_rectification_user_id, hidden_trouble_type, hidden_trouble_status, troubleshoot_rectification_measures, troubleshoot_rectification_happening, troubleshoot_rectification_money, troubleshoot_rectification_complete_time, troubleshoot_acceptance_user_id, troubleshoot_after_change_image_url, troubleshoot_acceptance_opinion, troubleshoot_acceptance_result, troubleshoot_acceptance_image_url, troubleshoot_progress from tr_troubleshoot_list
    </sql>
 
    <select id="selectTroubleshootListList" parameterType="TroubleshootList" resultMap="TroubleshootListResult">
        <include refid="selectTroubleshootListVo"/>
        <where>  
            <if test="troubleshootId != null "> and troubleshoot_id = #{troubleshootId}</if>
            <if test="createBy != null  and createBy != ''"> and create_by = #{createBy}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="troubleshootName != null  and troubleshootName != ''"> and troubleshoot_name like concat('%', #{troubleshootName}, '%')</if>
            <if test="troubleshootType != null "> and troubleshoot_type = #{troubleshootType}</if>
            <if test="troubleshootDept != null "> and troubleshoot_dept = #{troubleshootDept}</if>
            <if test="troubleshootRistId != null "> and troubleshoot_rist_id = #{troubleshootRistId}</if>
            <if test="troubleshootCheckUserId != null "> and troubleshoot_check_user_id = #{troubleshootCheckUserId}</if>
            <if test="troubleshootCheckedDeptId != null "> and troubleshoot_checked_dept_id = #{troubleshootCheckedDeptId}</if>
            <if test="troubleshootBiginTime != null "> and troubleshoot_bigin_time = #{troubleshootBiginTime}</if>
            <if test="troubleshootEndTime != null "> and troubleshoot_end_time = #{troubleshootEndTime}</if>
            <if test="troubleshootDistributeStatus != null "> and troubleshoot_distribute_status = #{troubleshootDistributeStatus}</if>
            <if test="troubleshootStatus != null "> and troubleshoot_status = #{troubleshootStatus}</if>
            <if test="troubleshootTroubleName != null  and troubleshootTroubleName != ''"> and troubleshoot_trouble_name like concat('%', #{troubleshootTroubleName}, '%')</if>
            <if test="troubleshootTroubleDescription != null  and troubleshootTroubleDescription != ''"> and troubleshoot_trouble_description = #{troubleshootTroubleDescription}</if>
            <if test="troubleshootTroubleLevel != null "> and troubleshoot_trouble_level = #{troubleshootTroubleLevel}</if>
            <if test="troubleshootTroubleType != null "> and troubleshoot_trouble_type = #{troubleshootTroubleType}</if>
            <if test="troubleshootTroubleDept != null "> and troubleshoot_trouble_dept = #{troubleshootTroubleDept}</if>
            <if test="troubleshootTroubleAddress != null  and troubleshootTroubleAddress != ''"> and troubleshoot_trouble_address = #{troubleshootTroubleAddress}</if>
            <if test="troubleshootTime != null "> and troubleshoot_time = #{troubleshootTime}</if>
            <if test="troubleshootBeforeChangeImageUrl != null  and troubleshootBeforeChangeImageUrl != ''"> and troubleshoot_before_change_image_url = #{troubleshootBeforeChangeImageUrl}</if>
            <if test="troubleshootReviewUserId != null "> and troubleshoot_review_user_id = #{troubleshootReviewUserId}</if>
            <if test="troubleshootRectificationUserId != null "> and troubleshoot_rectification_user_id = #{troubleshootRectificationUserId}</if>
            <if test="hiddenTroubleType != null "> and hidden_trouble_type = #{hiddenTroubleType}</if>
            <if test="hiddenTroubleStatus != null "> and hidden_trouble_status = #{hiddenTroubleStatus}</if>
            <if test="troubleshootRectificationMeasures != null  and troubleshootRectificationMeasures != ''"> and troubleshoot_rectification_measures = #{troubleshootRectificationMeasures}</if>
            <if test="troubleshootRectificationHappening != null  and troubleshootRectificationHappening != ''"> and troubleshoot_rectification_happening = #{troubleshootRectificationHappening}</if>
            <if test="troubleshootRectificationMoney != null "> and troubleshoot_rectification_money = #{troubleshootRectificationMoney}</if>
            <if test="troubleshootRectificationCompleteTime != null "> and troubleshoot_rectification_complete_time = #{troubleshootRectificationCompleteTime}</if>
            <if test="troubleshootAcceptanceUserId != null "> and troubleshoot_acceptance_user_id = #{troubleshootAcceptanceUserId}</if>
            <if test="troubleshootAfterChangeImageUrl != null  and troubleshootAfterChangeImageUrl != ''"> and troubleshoot_after_change_image_url = #{troubleshootAfterChangeImageUrl}</if>
            <if test="troubleshootAcceptanceOpinion != null  and troubleshootAcceptanceOpinion != ''"> and troubleshoot_acceptance_opinion = #{troubleshootAcceptanceOpinion}</if>
            <if test="troubleshootAcceptanceResult != null "> and troubleshoot_acceptance_result = #{troubleshootAcceptanceResult}</if>
            <if test="troubleshootAcceptanceImageUrl != null  and troubleshootAcceptanceImageUrl != ''"> and troubleshoot_acceptance_image_url = #{troubleshootAcceptanceImageUrl}</if>
            <if test="troubleshootProgress != null "> and troubleshoot_progress = #{troubleshootProgress}</if>
        </where>
    </select>
    
    <select id="selectTroubleshootListById" parameterType="Long" resultMap="TroubleshootListResult">
        <include refid="selectTroubleshootListVo"/>
        where troubleshoot_id = #{troubleshootId}
    </select>
        
    <insert id="insertTroubleshootList" parameterType="TroubleshootList">
        insert into tr_troubleshoot_list
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="troubleshootId != null ">troubleshoot_id,</if>
            <if test="createBy != null  and createBy != ''">create_by,</if>
            <if test="createTime != null ">create_time,</if>
            <if test="updateBy != null  and updateBy != ''">update_by,</if>
            <if test="updateTime != null ">update_time,</if>
            <if test="remark != null  and remark != ''">remark,</if>
            <if test="troubleshootName != null  and troubleshootName != ''">troubleshoot_name,</if>
            <if test="troubleshootType != null ">troubleshoot_type,</if>
            <if test="troubleshootDept != null ">troubleshoot_dept,</if>
            <if test="troubleshootRistId != null ">troubleshoot_rist_id,</if>
            <if test="troubleshootCheckUserId != null ">troubleshoot_check_user_id,</if>
            <if test="troubleshootCheckedDeptId != null ">troubleshoot_checked_dept_id,</if>
            <if test="troubleshootBiginTime != null ">troubleshoot_bigin_time,</if>
            <if test="troubleshootEndTime != null ">troubleshoot_end_time,</if>
            <if test="troubleshootDistributeStatus != null ">troubleshoot_distribute_status,</if>
            <if test="troubleshootStatus != null ">troubleshoot_status,</if>
            <if test="troubleshootTroubleName != null  and troubleshootTroubleName != ''">troubleshoot_trouble_name,</if>
            <if test="troubleshootTroubleDescription != null  and troubleshootTroubleDescription != ''">troubleshoot_trouble_description,</if>
            <if test="troubleshootTroubleLevel != null ">troubleshoot_trouble_level,</if>
            <if test="troubleshootTroubleType != null ">troubleshoot_trouble_type,</if>
            <if test="troubleshootTroubleDept != null ">troubleshoot_trouble_dept,</if>
            <if test="troubleshootTroubleAddress != null  and troubleshootTroubleAddress != ''">troubleshoot_trouble_address,</if>
            <if test="troubleshootTime != null ">troubleshoot_time,</if>
            <if test="troubleshootBeforeChangeImageUrl != null  and troubleshootBeforeChangeImageUrl != ''">troubleshoot_before_change_image_url,</if>
            <if test="troubleshootReviewUserId != null ">troubleshoot_review_user_id,</if>
            <if test="troubleshootRectificationUserId != null ">troubleshoot_rectification_user_id,</if>
            <if test="hiddenTroubleType != null ">hidden_trouble_type,</if>
            <if test="hiddenTroubleStatus != null ">hidden_trouble_status,</if>
            <if test="troubleshootRectificationMeasures != null  and troubleshootRectificationMeasures != ''">troubleshoot_rectification_measures,</if>
            <if test="troubleshootRectificationHappening != null  and troubleshootRectificationHappening != ''">troubleshoot_rectification_happening,</if>
            <if test="troubleshootRectificationMoney != null ">troubleshoot_rectification_money,</if>
            <if test="troubleshootRectificationCompleteTime != null ">troubleshoot_rectification_complete_time,</if>
            <if test="troubleshootAcceptanceUserId != null ">troubleshoot_acceptance_user_id,</if>
            <if test="troubleshootAfterChangeImageUrl != null  and troubleshootAfterChangeImageUrl != ''">troubleshoot_after_change_image_url,</if>
            <if test="troubleshootAcceptanceOpinion != null  and troubleshootAcceptanceOpinion != ''">troubleshoot_acceptance_opinion,</if>
            <if test="troubleshootAcceptanceResult != null ">troubleshoot_acceptance_result,</if>
            <if test="troubleshootAcceptanceImageUrl != null  and troubleshootAcceptanceImageUrl != ''">troubleshoot_acceptance_image_url,</if>
            <if test="troubleshootProgress != null ">troubleshoot_progress,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="troubleshootId != null ">#{troubleshootId},</if>
            <if test="createBy != null  and createBy != ''">#{createBy},</if>
            <if test="createTime != null ">#{createTime},</if>
            <if test="updateBy != null  and updateBy != ''">#{updateBy},</if>
            <if test="updateTime != null ">#{updateTime},</if>
            <if test="remark != null  and remark != ''">#{remark},</if>
            <if test="troubleshootName != null  and troubleshootName != ''">#{troubleshootName},</if>
            <if test="troubleshootType != null ">#{troubleshootType},</if>
            <if test="troubleshootDept != null ">#{troubleshootDept},</if>
            <if test="troubleshootRistId != null ">#{troubleshootRistId},</if>
            <if test="troubleshootCheckUserId != null ">#{troubleshootCheckUserId},</if>
            <if test="troubleshootCheckedDeptId != null ">#{troubleshootCheckedDeptId},</if>
            <if test="troubleshootBiginTime != null ">#{troubleshootBiginTime},</if>
            <if test="troubleshootEndTime != null ">#{troubleshootEndTime},</if>
            <if test="troubleshootDistributeStatus != null ">#{troubleshootDistributeStatus},</if>
            <if test="troubleshootStatus != null ">#{troubleshootStatus},</if>
            <if test="troubleshootTroubleName != null  and troubleshootTroubleName != ''">#{troubleshootTroubleName},</if>
            <if test="troubleshootTroubleDescription != null  and troubleshootTroubleDescription != ''">#{troubleshootTroubleDescription},</if>
            <if test="troubleshootTroubleLevel != null ">#{troubleshootTroubleLevel},</if>
            <if test="troubleshootTroubleType != null ">#{troubleshootTroubleType},</if>
            <if test="troubleshootTroubleDept != null ">#{troubleshootTroubleDept},</if>
            <if test="troubleshootTroubleAddress != null  and troubleshootTroubleAddress != ''">#{troubleshootTroubleAddress},</if>
            <if test="troubleshootTime != null ">#{troubleshootTime},</if>
            <if test="troubleshootBeforeChangeImageUrl != null  and troubleshootBeforeChangeImageUrl != ''">#{troubleshootBeforeChangeImageUrl},</if>
            <if test="troubleshootReviewUserId != null ">#{troubleshootReviewUserId},</if>
            <if test="troubleshootRectificationUserId != null ">#{troubleshootRectificationUserId},</if>
            <if test="hiddenTroubleType != null ">#{hiddenTroubleType},</if>
            <if test="hiddenTroubleStatus != null ">#{hiddenTroubleStatus},</if>
            <if test="troubleshootRectificationMeasures != null  and troubleshootRectificationMeasures != ''">#{troubleshootRectificationMeasures},</if>
            <if test="troubleshootRectificationHappening != null  and troubleshootRectificationHappening != ''">#{troubleshootRectificationHappening},</if>
            <if test="troubleshootRectificationMoney != null ">#{troubleshootRectificationMoney},</if>
            <if test="troubleshootRectificationCompleteTime != null ">#{troubleshootRectificationCompleteTime},</if>
            <if test="troubleshootAcceptanceUserId != null ">#{troubleshootAcceptanceUserId},</if>
            <if test="troubleshootAfterChangeImageUrl != null  and troubleshootAfterChangeImageUrl != ''">#{troubleshootAfterChangeImageUrl},</if>
            <if test="troubleshootAcceptanceOpinion != null  and troubleshootAcceptanceOpinion != ''">#{troubleshootAcceptanceOpinion},</if>
            <if test="troubleshootAcceptanceResult != null ">#{troubleshootAcceptanceResult},</if>
            <if test="troubleshootAcceptanceImageUrl != null  and troubleshootAcceptanceImageUrl != ''">#{troubleshootAcceptanceImageUrl},</if>
            <if test="troubleshootProgress != null ">#{troubleshootProgress},</if>
         </trim>
    </insert>
 
    <update id="updateTroubleshootList" parameterType="TroubleshootList">
        update tr_troubleshoot_list
        <trim prefix="SET" suffixOverrides=",">
            <if test="createBy != null  and createBy != ''">create_by = #{createBy},</if>
            <if test="createTime != null ">create_time = #{createTime},</if>
            <if test="updateBy != null  and updateBy != ''">update_by = #{updateBy},</if>
            <if test="updateTime != null ">update_time = #{updateTime},</if>
            <if test="remark != null  and remark != ''">remark = #{remark},</if>
            <if test="troubleshootName != null  and troubleshootName != ''">troubleshoot_name = #{troubleshootName},</if>
            <if test="troubleshootType != null ">troubleshoot_type = #{troubleshootType},</if>
            <if test="troubleshootDept != null ">troubleshoot_dept = #{troubleshootDept},</if>
            <if test="troubleshootRistId != null ">troubleshoot_rist_id = #{troubleshootRistId},</if>
            <if test="troubleshootCheckUserId != null ">troubleshoot_check_user_id = #{troubleshootCheckUserId},</if>
            <if test="troubleshootCheckedDeptId != null ">troubleshoot_checked_dept_id = #{troubleshootCheckedDeptId},</if>
            <if test="troubleshootBiginTime != null ">troubleshoot_bigin_time = #{troubleshootBiginTime},</if>
            <if test="troubleshootEndTime != null ">troubleshoot_end_time = #{troubleshootEndTime},</if>
            <if test="troubleshootDistributeStatus != null ">troubleshoot_distribute_status = #{troubleshootDistributeStatus},</if>
            <if test="troubleshootStatus != null ">troubleshoot_status = #{troubleshootStatus},</if>
            <if test="troubleshootTroubleName != null  and troubleshootTroubleName != ''">troubleshoot_trouble_name = #{troubleshootTroubleName},</if>
            <if test="troubleshootTroubleDescription != null  and troubleshootTroubleDescription != ''">troubleshoot_trouble_description = #{troubleshootTroubleDescription},</if>
            <if test="troubleshootTroubleLevel != null ">troubleshoot_trouble_level = #{troubleshootTroubleLevel},</if>
            <if test="troubleshootTroubleType != null ">troubleshoot_trouble_type = #{troubleshootTroubleType},</if>
            <if test="troubleshootTroubleDept != null ">troubleshoot_trouble_dept = #{troubleshootTroubleDept},</if>
            <if test="troubleshootTroubleAddress != null  and troubleshootTroubleAddress != ''">troubleshoot_trouble_address = #{troubleshootTroubleAddress},</if>
            <if test="troubleshootTime != null ">troubleshoot_time = #{troubleshootTime},</if>
            <if test="troubleshootBeforeChangeImageUrl != null  and troubleshootBeforeChangeImageUrl != ''">troubleshoot_before_change_image_url = #{troubleshootBeforeChangeImageUrl},</if>
            <if test="troubleshootReviewUserId != null ">troubleshoot_review_user_id = #{troubleshootReviewUserId},</if>
            <if test="troubleshootRectificationUserId != null ">troubleshoot_rectification_user_id = #{troubleshootRectificationUserId},</if>
            <if test="hiddenTroubleType != null ">hidden_trouble_type = #{hiddenTroubleType},</if>
            <if test="hiddenTroubleStatus != null ">hidden_trouble_status = #{hiddenTroubleStatus},</if>
            <if test="troubleshootRectificationMeasures != null  and troubleshootRectificationMeasures != ''">troubleshoot_rectification_measures = #{troubleshootRectificationMeasures},</if>
            <if test="troubleshootRectificationHappening != null  and troubleshootRectificationHappening != ''">troubleshoot_rectification_happening = #{troubleshootRectificationHappening},</if>
            <if test="troubleshootRectificationMoney != null ">troubleshoot_rectification_money = #{troubleshootRectificationMoney},</if>
            <if test="troubleshootRectificationCompleteTime != null ">troubleshoot_rectification_complete_time = #{troubleshootRectificationCompleteTime},</if>
            <if test="troubleshootAcceptanceUserId != null ">troubleshoot_acceptance_user_id = #{troubleshootAcceptanceUserId},</if>
            <if test="troubleshootAfterChangeImageUrl != null  and troubleshootAfterChangeImageUrl != ''">troubleshoot_after_change_image_url = #{troubleshootAfterChangeImageUrl},</if>
            <if test="troubleshootAcceptanceOpinion != null  and troubleshootAcceptanceOpinion != ''">troubleshoot_acceptance_opinion = #{troubleshootAcceptanceOpinion},</if>
            <if test="troubleshootAcceptanceResult != null ">troubleshoot_acceptance_result = #{troubleshootAcceptanceResult},</if>
            <if test="troubleshootAcceptanceImageUrl != null  and troubleshootAcceptanceImageUrl != ''">troubleshoot_acceptance_image_url = #{troubleshootAcceptanceImageUrl},</if>
            <if test="troubleshootProgress != null ">troubleshoot_progress = #{troubleshootProgress},</if>
        </trim>
        where troubleshoot_id = #{troubleshootId}
    </update>
 
    <delete id="deleteTroubleshootListById" parameterType="Long">
        delete from tr_troubleshoot_list where troubleshoot_id = #{troubleshootId}
    </delete>
 
    <delete id="deleteTroubleshootListByIds" parameterType="String">
        delete from tr_troubleshoot_list where troubleshoot_id in 
        <foreach item="troubleshootId" collection="array" open="(" separator="," close=")">
            #{troubleshootId}
        </foreach>
    </delete>
    
</mapper>