|
@@ -40,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
40
|
40
|
<association property="managerUser" javaType="SysUser" resultMap="ManagerUserResult" />
|
41
|
41
|
<association property="xmUser" javaType="SysUser" resultMap="XmUserResult" />
|
42
|
42
|
<association property="zjlUser" javaType="SysUser" resultMap="ZjlUserResult" />
|
|
43
|
+ <association property="dszUser" javaType="SysUser" resultMap="DszUserResult" />
|
43
|
44
|
<association property="unionUser" javaType="SysUser" resultMap="UnionUserResult" />
|
44
|
45
|
<association property="cwUser" javaType="SysUser" resultMap="CwUserResult" />
|
45
|
46
|
<association property="dept" javaType="SysDept" resultMap="SysDeptResult" />
|
|
@@ -71,6 +72,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
71
|
72
|
<result property="nickName" column="zjl_nick_name" />
|
72
|
73
|
</resultMap>
|
73
|
74
|
|
|
75
|
+ <resultMap type="SysUser" id="DszUserResult">
|
|
76
|
+ <result property="userId" column="user_id" />
|
|
77
|
+ <result property="nickName" column="dsz_nick_name" />
|
|
78
|
+ </resultMap>
|
|
79
|
+
|
74
|
80
|
<resultMap type="SysUser" id="UnionUserResult">
|
75
|
81
|
<result property="userId" column="user_id" />
|
76
|
82
|
<result property="nickName" column="union_nick_name" />
|
|
@@ -95,8 +101,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
95
|
101
|
<sql id="selectCmcBorrowVo">
|
96
|
102
|
select b.borrow_id, b.project_id, p.project_number, p.project_name, b.apply_reason, b.applier, u.nick_name as applier_nick_name, d.dept_name, b.apply_dept, b.remark, b.borrow_usage,
|
97
|
103
|
b.apply_date, b.apply_amount, b.manager_amount, b.dept_comment, b.dept_user_id, u1.nick_name as dept_nick_name, b.xm_user_id, u2.nick_name as xm_nick_name, b.xm_comment,
|
98
|
|
- b.manager_comment, b.manager_user_id, u3.nick_name as manager_nick_name, b.zjl_user_id, u4.nick_name as zjl_nick_name, b.zjl_comment, b.union_user_id, u5.nick_name as zjl_nick_name,
|
99
|
|
- b.union_comment, b.cw_user_id, u6.nick_name as cw_nick_name, b.cw_comment, b.dept_time, b.xm_time, b.manager_time, b.zjl_time, b.lend_time, b.lend_document, b.borrow_document, b.union_time from cmc_borrow as b
|
|
104
|
+ b.manager_comment, b.manager_user_id, u3.nick_name as manager_nick_name, b.zjl_user_id, u4.nick_name as zjl_nick_name, b.zjl_comment, b.dsz_comment, b.union_user_id,
|
|
105
|
+ u5.nick_name as zjl_nick_name, b.union_comment, b.cw_user_id, u6.nick_name as cw_nick_name, b.dsz_user_id, u7.nick_name as dsz_nick_name, b.cw_comment, b.dept_time, b.xm_time,
|
|
106
|
+ b.manager_time, b.zjl_time, b.dsz_time, b.lend_time, b.lend_document, b.borrow_document, b.union_time from cmc_borrow as b
|
100
|
107
|
left join sys_user as u on u.user_id = b.applier
|
101
|
108
|
left join sys_user as u1 on u1.user_id = b.dept_user_id
|
102
|
109
|
left join sys_user as u2 on u2.user_id = b.xm_user_id
|
|
@@ -104,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
104
|
111
|
left join sys_user as u4 on u4.user_id = b.zjl_user_id
|
105
|
112
|
left join sys_user as u5 on u5.user_id = b.union_user_id
|
106
|
113
|
left join sys_user as u6 on u6.user_id = b.cw_user_id
|
|
114
|
+ left join sys_user as u7 on u7.user_id = b.dsz_user_id
|
107
|
115
|
left join sys_dept as d on d.dept_id = b.apply_dept
|
108
|
116
|
left join cmc_project as p on b.project_id = p.project_id
|
109
|
117
|
</sql>
|
|
@@ -128,6 +136,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
128
|
136
|
<if test="managerUserId != null "> and b.manager_user_id = #{managerUserId}</if>
|
129
|
137
|
<if test="zjlUserId != null "> and b.zjl_user_id = #{zjlUserId}</if>
|
130
|
138
|
<if test="zjlComment != null and zjlComment != ''"> and b.zjl_comment = #{zjlComment}</if>
|
|
139
|
+ <if test="dszUserId != null "> and b.dsz_user_id = #{dszUserId}</if>
|
|
140
|
+ <if test="dszComment != null and dszComment != ''"> and b.dsz_comment = #{dszComment}</if>
|
131
|
141
|
<if test="unionUserId != null "> and b.union_user_id = #{unionUserId}</if>
|
132
|
142
|
<if test="unionComment != null and unionComment != ''"> and b.union_comment = #{unionComment}</if>
|
133
|
143
|
<if test="cwUserId != null "> and b.cw_user_id = #{cwUserId}</if>
|
|
@@ -136,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
136
|
146
|
<if test="xmTime != null "> and b.xm_time = #{xmTime}</if>
|
137
|
147
|
<if test="managerTime != null "> and b.manager_time = #{managerTime}</if>
|
138
|
148
|
<if test="zjlTime != null "> and b.zjl_time = #{zjlTime}</if>
|
|
149
|
+ <if test="dszTime != null "> and b.dsz_time = #{dszTime}</if>
|
139
|
150
|
<if test="lendTime != null "> and b.lend_time = #{lendTime}</if>
|
140
|
151
|
<if test="unionTime != null "> and b.union_time = #{unionTime}</if>
|
141
|
152
|
</where>
|
|
@@ -168,6 +179,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
168
|
179
|
<if test="managerUserId != null">manager_user_id,</if>
|
169
|
180
|
<if test="zjlUserId != null">zjl_user_id,</if>
|
170
|
181
|
<if test="zjlComment != null">zjl_comment,</if>
|
|
182
|
+ <if test="dszUserId != null">dsz_user_id,</if>
|
|
183
|
+ <if test="dszComment != null">dsz_comment,</if>
|
171
|
184
|
<if test="unionUserId != null">union_user_id,</if>
|
172
|
185
|
<if test="unionComment != null">union_comment,</if>
|
173
|
186
|
<if test="cwUserId != null">cw_user_id,</if>
|
|
@@ -176,6 +189,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
176
|
189
|
<if test="xmTime != null">xm_time,</if>
|
177
|
190
|
<if test="managerTime != null">manager_time,</if>
|
178
|
191
|
<if test="zjlTime != null">zjl_time,</if>
|
|
192
|
+ <if test="dszTime != null">dsz_time,</if>
|
179
|
193
|
<if test="lendTime != null">lend_time,</if>
|
180
|
194
|
<if test="unionTime != null">union_time,</if>
|
181
|
195
|
<if test="lendDocument != null">lend_document,</if>
|
|
@@ -200,6 +214,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
200
|
214
|
<if test="managerUserId != null">#{managerUserId},</if>
|
201
|
215
|
<if test="zjlUserId != null">#{zjlUserId},</if>
|
202
|
216
|
<if test="zjlComment != null">#{zjlComment},</if>
|
|
217
|
+ <if test="dszUserId != null">#{dszUserId},</if>
|
|
218
|
+ <if test="dszComment != null">#{dszComment},</if>
|
203
|
219
|
<if test="unionUserId != null">#{unionUserId},</if>
|
204
|
220
|
<if test="unionComment != null">#{unionComment},</if>
|
205
|
221
|
<if test="cwUserId != null">#{cwUserId},</if>
|
|
@@ -208,6 +224,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
208
|
224
|
<if test="xmTime != null">#{xmTime},</if>
|
209
|
225
|
<if test="managerTime != null">#{managerTime},</if>
|
210
|
226
|
<if test="zjlTime != null">#{zjlTime},</if>
|
|
227
|
+ <if test="dszTime != null">#{dszTime},</if>
|
211
|
228
|
<if test="unionTime != null">#{unionTime},</if>
|
212
|
229
|
<if test="lendTime != null">#{lendTime},</if>
|
213
|
230
|
<if test="lendDocument != null">#{lendDocument},</if>
|
|
@@ -235,6 +252,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
235
|
252
|
<if test="managerUserId != null">manager_user_id = #{managerUserId},</if>
|
236
|
253
|
<if test="zjlUserId != null">zjl_user_id = #{zjlUserId},</if>
|
237
|
254
|
<if test="zjlComment != null">zjl_comment = #{zjlComment},</if>
|
|
255
|
+ <if test="dszUserId != null">dsz_user_id = #{dszUserId},</if>
|
|
256
|
+ <if test="dszComment != null">dsz_comment = #{dszComment},</if>
|
238
|
257
|
<if test="unionUserId != null">union_user_id = #{unionUserId},</if>
|
239
|
258
|
<if test="unionComment != null">zjl_comment = #{unionComment},</if>
|
240
|
259
|
<if test="cwUserId != null">cw_user_id = #{cwUserId},</if>
|
|
@@ -243,6 +262,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
243
|
262
|
<if test="xmTime != null">xm_time = #{xmTime},</if>
|
244
|
263
|
<if test="managerTime != null">manager_time = #{managerTime},</if>
|
245
|
264
|
<if test="zjlTime != null">zjl_time = #{zjlTime},</if>
|
|
265
|
+ <if test="dszTime != null">dsz_time = #{dszTime},</if>
|
246
|
266
|
<if test="unionTime != null">union_time = #{unionTime},</if>
|
247
|
267
|
<if test="lendTime != null">lend_time = #{lendTime},</if>
|
248
|
268
|
<if test="lendDocument != null">lend_document = #{lendDocument},</if>
|