|
@@ -140,7 +140,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
140
|
140
|
${params.dataScope}
|
141
|
141
|
order by u.dept_id, u.user_id
|
142
|
142
|
</select>
|
143
|
|
-
|
|
143
|
+
|
|
144
|
+ <select id="selectUserServingList" parameterType="SysUser" resultMap="SysUserResult">
|
|
145
|
+ select u.user_id, u.dept_id, u.nick_name, u.pinyin, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag,
|
|
146
|
+ u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, u.pm_level, u.titles, u.certificates, u.update_reason,
|
|
147
|
+ u.engineer_level, u.post_level, u.salary_level, u.operator_level, u.entry_date, u.birthday, u.age, u.id_card,
|
|
148
|
+ u.native_place, u.political_affiliation, u.ethnic, u.graduate_school, u.major, u.degree, u.contract_sign, u.contract_expire,
|
|
149
|
+ u.home_place, d.dept_name, d.leader, ps.salary from sys_user u
|
|
150
|
+ left join sys_dept d on u.dept_id = d.dept_id
|
|
151
|
+ left join cmc_post_salary ps on u.post_level = ps.post_level and u.salary_level = ps.salary_level
|
|
152
|
+ where u.del_flag = '0' and u.user_id != 1 AND (u.status = '0' or u.status = '3' or u.status = '4')
|
|
153
|
+ <if test="userId != null and userId != 0">
|
|
154
|
+ AND u.user_id = #{userId}
|
|
155
|
+ </if>
|
|
156
|
+ <if test="userName != null and userName != ''">
|
|
157
|
+ AND u.user_name like concat('%', #{userName}, '%')
|
|
158
|
+ </if>
|
|
159
|
+ <if test="nickName != null and nickName != ''">
|
|
160
|
+ AND u.nick_name like concat('%', #{nickName}, '%')
|
|
161
|
+ </if>
|
|
162
|
+ <if test="phonenumber != null and phonenumber != ''">
|
|
163
|
+ AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
|
164
|
+ </if>
|
|
165
|
+ <if test="degree != null and degree != ''">
|
|
166
|
+ AND u.degree = #{degree}
|
|
167
|
+ </if>
|
|
168
|
+ <if test="titles != null and titles != ''">
|
|
169
|
+ AND find_in_set(#{titles}, u.titles)
|
|
170
|
+ </if>
|
|
171
|
+ <if test="certificates != null and certificates != ''">
|
|
172
|
+ AND find_in_set(#{certificates}, u.certificates)
|
|
173
|
+ </if>
|
|
174
|
+ <if test="politicalAffiliation != null and politicalAffiliation != ''">
|
|
175
|
+ AND find_in_set(#{politicalAffiliation}, u.political_affiliation)
|
|
176
|
+ </if>
|
|
177
|
+ <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
|
178
|
+ AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
|
179
|
+ </if>
|
|
180
|
+ <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
|
181
|
+ AND date_format(u.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
182
|
+ </if>
|
|
183
|
+ <if test="deptId != null and deptId != 0">
|
|
184
|
+ AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
|
|
185
|
+ </if>
|
|
186
|
+ <!-- 数据范围过滤 -->
|
|
187
|
+ ${params.dataScope}
|
|
188
|
+ order by u.dept_id, u.user_id
|
|
189
|
+ </select>
|
|
190
|
+
|
144
|
191
|
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
145
|
192
|
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
146
|
193
|
from sys_user u
|