ArchivesCollectBoxMapper.xml
15.1 KB
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<?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.mapper.ArchivesCollectBoxMapper">
<resultMap type="ArchivesCollectBox" id="ArchivesCollectBoxResult">
<result property="id" column="id" />
<result property="boxId" column="box_id" />
<result property="general" column="general" />
<result property="year" column="year" />
<result property="title" column="title" />
<result property="sort" column="sort" />
<result property="safekeepingDate" column="safekeeping_date" />
<result property="secretLevel" column="secret_level" />
<result property="pages" column="pages" />
<result property="filingNumber" column="filing_number" />
<result property="zkNumber" column="zk_number" />
<result property="locationCode" column="location_code" />
<result property="filingDept" column="filing_dept" />
<result property="archivalCode" column="archival_code" />
<result property="responsibilityName" column="responsibility_name" />
<result property="serialMark" column="serial_mark" />
<result property="pieceMark" column="piece_mark" />
<result property="registerMark" column="register_mark" />
<result property="counsellors" column="counsellors" />
<result property="filingName" column="filing_name" />
<result property="summaryName" column="summary_name" />
<result property="recordType" column="record_type" />
<result property="carrierType" column="carrier_type" />
<result property="draftName" column="draft_name" />
<result property="page" column="page" />
<result property="documentMark" column="document_mark" />
<result property="text" column="text" />
<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="status" column="status" />
<result property="apprvoal" column="apprvoal" />
<result property="belongRole" column="belong_role" />
<result property="boxMark" column="box_mark" />
</resultMap>
<sql id="selectArchivesCollectBoxVo">
select id,box_id, general, year, title, sort, safekeeping_date, secret_level, pages, filing_number, zk_number, location_code, filing_dept, archival_code, responsibility_name, serial_mark, piece_mark, register_mark, counsellors, filing_name, summary_name, record_type, carrier_type, draft_name, page, document_mark, text, create_by, create_time, update_by, update_time, status, apprvoal, belong_role, box_mark from archives_collect_box
</sql>
<select id="selectArchivesCollectBoxList" parameterType="ArchivesCollectBox" resultMap="ArchivesCollectBoxResult">
<include refid="selectArchivesCollectBoxVo"/>
<where>
<if test="boxId != null "> and box_id = #{boxId}</if>
<if test="general != null and general != ''"> and general = #{general}</if>
<if test="year != null and year != ''"> and year = #{year}</if>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="sort != null and sort != ''"> and sort = #{sort}</if>
<if test="safekeepingDate != null "> and safekeeping_date = #{safekeepingDate}</if>
<if test="secretLevel != null and secretLevel != ''"> and secret_level = #{secretLevel}</if>
<if test="pages != null and pages != ''"> and pages = #{pages}</if>
<if test="filingNumber != null and filingNumber != ''"> and filing_number = #{filingNumber}</if>
<if test="zkNumber != null and zkNumber != ''"> and zk_number = #{zkNumber}</if>
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
<if test="filingDept != null and filingDept != ''"> and filing_dept = #{filingDept}</if>
<if test="archivalCode != null and archivalCode != ''"> and archival_code = #{archivalCode}</if>
<if test="responsibilityName != null and responsibilityName != ''"> and responsibility_name like concat('%', #{responsibilityName}, '%')</if>
<if test="serialMark != null and serialMark != ''"> and serial_mark = #{serialMark}</if>
<if test="pieceMark != null and pieceMark != ''"> and piece_mark = #{pieceMark}</if>
<if test="registerMark != null and registerMark != ''"> and register_mark = #{registerMark}</if>
<if test="counsellors != null and counsellors != ''"> and counsellors = #{counsellors}</if>
<if test="filingName != null and filingName != ''"> and filing_name like concat('%', #{filingName}, '%')</if>
<if test="summaryName != null and summaryName != ''"> and summary_name like concat('%', #{summaryName}, '%')</if>
<if test="recordType != null and recordType != ''"> and record_type = #{recordType}</if>
<if test="carrierType != null and carrierType != ''"> and carrier_type = #{carrierType}</if>
<if test="draftName != null and draftName != ''"> and draft_name like concat('%', #{draftName}, '%')</if>
<if test="page != null and page != ''"> and page = #{page}</if>
<if test="documentMark != null and documentMark != ''"> and document_mark = #{documentMark}</if>
<if test="text != null and text != ''"> and text = #{text}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="apprvoal != null and apprvoal != ''"> and apprvoal = #{apprvoal}</if>
<if test="belongRole != null and belongRole != ''"> and belong_role = #{belongRole}</if>
<if test="boxMark != null and boxMark != ''"> and box_mark = #{boxMark}</if>
</where>
</select>
<select id="selectArchivesCollectBoxById" parameterType="Long" resultMap="ArchivesCollectBoxResult">
<include refid="selectArchivesCollectBoxVo"/>
where id = #{id}
</select>
<insert id="insertArchivesCollectBox" parameterType="ArchivesCollectBox" useGeneratedKeys="true" keyProperty="id">
insert into archives_collect_box
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="boxId != null">box_id,</if>
<if test="general != null">general,</if>
<if test="year != null">year,</if>
<if test="title != null">title,</if>
<if test="sort != null">sort,</if>
<if test="safekeepingDate != null">safekeeping_date,</if>
<if test="secretLevel != null">secret_level,</if>
<if test="pages != null">pages,</if>
<if test="filingNumber != null">filing_number,</if>
<if test="zkNumber != null">zk_number,</if>
<if test="locationCode != null">location_code,</if>
<if test="filingDept != null">filing_dept,</if>
<if test="archivalCode != null">archival_code,</if>
<if test="responsibilityName != null">responsibility_name,</if>
<if test="serialMark != null">serial_mark,</if>
<if test="pieceMark != null">piece_mark,</if>
<if test="registerMark != null">register_mark,</if>
<if test="counsellors != null">counsellors,</if>
<if test="filingName != null">filing_name,</if>
<if test="summaryName != null">summary_name,</if>
<if test="recordType != null">record_type,</if>
<if test="carrierType != null">carrier_type,</if>
<if test="draftName != null">draft_name,</if>
<if test="page != null">page,</if>
<if test="documentMark != null">document_mark,</if>
<if test="text != null">text,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="status != null">status,</if>
<if test="apprvoal != null">apprvoal,</if>
<if test="belongRole != null">belong_role,</if>
<if test="boxMark != null">box_mark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="boxId != null">#{boxId},</if>
<if test="general != null">#{general},</if>
<if test="year != null">#{year},</if>
<if test="title != null">#{title},</if>
<if test="sort != null">#{sort},</if>
<if test="safekeepingDate != null">#{safekeepingDate},</if>
<if test="secretLevel != null">#{secretLevel},</if>
<if test="pages != null">#{pages},</if>
<if test="filingNumber != null">#{filingNumber},</if>
<if test="zkNumber != null">#{zkNumber},</if>
<if test="locationCode != null">#{locationCode},</if>
<if test="filingDept != null">#{filingDept},</if>
<if test="archivalCode != null">#{archivalCode},</if>
<if test="responsibilityName != null">#{responsibilityName},</if>
<if test="serialMark != null">#{serialMark},</if>
<if test="pieceMark != null">#{pieceMark},</if>
<if test="registerMark != null">#{registerMark},</if>
<if test="counsellors != null">#{counsellors},</if>
<if test="filingName != null">#{filingName},</if>
<if test="summaryName != null">#{summaryName},</if>
<if test="recordType != null">#{recordType},</if>
<if test="carrierType != null">#{carrierType},</if>
<if test="draftName != null">#{draftName},</if>
<if test="page != null">#{page},</if>
<if test="documentMark != null">#{documentMark},</if>
<if test="text != null">#{text},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="status != null">#{status},</if>
<if test="apprvoal != null">#{apprvoal},</if>
<if test="belongRole != null">#{belongRole},</if>
<if test="boxMark != null">#{boxMark},</if>
</trim>
</insert>
<update id="updateArchivesCollectBox" parameterType="ArchivesCollectBox">
update archives_collect_box
<trim prefix="SET" suffixOverrides=",">
<if test="boxId != null">box_id = #{boxId},</if>
<if test="general != null">general = #{general},</if>
<if test="year != null">year = #{year},</if>
<if test="title != null">title = #{title},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="safekeepingDate != null">safekeeping_date = #{safekeepingDate},</if>
<if test="secretLevel != null">secret_level = #{secretLevel},</if>
<if test="pages != null">pages = #{pages},</if>
<if test="filingNumber != null">filing_number = #{filingNumber},</if>
<if test="zkNumber != null">zk_number = #{zkNumber},</if>
<if test="locationCode != null">location_code = #{locationCode},</if>
<if test="filingDept != null">filing_dept = #{filingDept},</if>
<if test="archivalCode != null">archival_code = #{archivalCode},</if>
<if test="responsibilityName != null">responsibility_name = #{responsibilityName},</if>
<if test="serialMark != null">serial_mark = #{serialMark},</if>
<if test="pieceMark != null">piece_mark = #{pieceMark},</if>
<if test="registerMark != null">register_mark = #{registerMark},</if>
<if test="counsellors != null">counsellors = #{counsellors},</if>
<if test="filingName != null">filing_name = #{filingName},</if>
<if test="summaryName != null">summary_name = #{summaryName},</if>
<if test="recordType != null">record_type = #{recordType},</if>
<if test="carrierType != null">carrier_type = #{carrierType},</if>
<if test="draftName != null">draft_name = #{draftName},</if>
<if test="page != null">page = #{page},</if>
<if test="documentMark != null">document_mark = #{documentMark},</if>
<if test="text != null">text = #{text},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="status != null">status = #{status},</if>
<if test="apprvoal != null">apprvoal = #{apprvoal},</if>
<if test="belongRole != null">belong_role = #{belongRole},</if>
<if test="boxMark != null">box_mark = #{boxMark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteArchivesCollectBoxById" parameterType="Long">
delete from archives_collect_box where id = #{id}
</delete>
<delete id="deleteArchivesCollectBoxByIds" parameterType="String">
delete from archives_collect_box where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="UpdateremoveTypeArchivesCollectBoxByIds">
update archives_collect_box set remove =#{remove} where id in
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<update id="Scatter" >
update archives_collect_box set
<if test="boxId != null">box_id =Null , status = #{status} ,apprvoal= #{apprvoal} where box_id = #{boxId}</if>
</update>
<update id="updateArchivesCollectBoxByIds" parameterType="ArchivesCollectBox">
update archives_collect_box
<trim prefix="SET" suffixOverrides=",">
<if test="archivesCollectBox.borrowStatus != null">borrow_status = #{archivesCollectBox.borrowStatus},</if>
<if test="archivesCollectBox.deportNodeId != null">deport_node_id = #{archivesCollectBox.deportNodeId},</if>
</trim>
where id in
<foreach collection="ids" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<update id="updateArchivesCollectBoxByBoxId" parameterType="ArchivesCollectBox">
update archives_collect_box
<trim prefix="SET" suffixOverrides=",">
<if test="deportNodeId != null and deportNodeId != 'isNull'">deport_node_id = #{deportNodeId},</if>
<if test="borrowStatus != null ">borrow_status = #{borrowStatus},</if>
<if test="deportNodeId == 'isNull'">deport_node_id = NULL,</if>
</trim>
where box_id = #{boxId}
</update>
</mapper>