| | |
| | | <result column="securitynumber" property="securitynumber"/> |
| | | <result column="dispatch" property="dispatch"/> |
| | | <result column="my_picture" property="myPicture"/> |
| | | <result column="is_apply" property="isApply"/> |
| | | <result column="deptname" property="deptname"/> |
| | | </resultMap> |
| | | |
| | |
| | | <select id="selectUserPageSecurityApply" resultMap="userResultMap"> |
| | | select |
| | | bu.*, |
| | | sa.id applyId,sa.apply_status applyStatus, |
| | | bd.dept_name |
| | | from |
| | | blade_user bu |
| | |
| | | blade_dept bd |
| | | on |
| | | bu.dept_id = bd.id |
| | | left join |
| | | sys_apply sa |
| | | on |
| | | sa.user_id = bu.id |
| | | where |
| | | bu.is_deleted = 0 |
| | | and |
| | |
| | | <if test="user.deptId!=null and user.deptId != ''"> |
| | | and bu.dept_id = #{user.deptId} |
| | | </if> |
| | | <if test="user.applyStatus!=null"> |
| | | and sa.apply_status = #{user.applyStatus} |
| | | <if test="user.isApply!=null"> |
| | | and sa.is_apply = #{user.isApply} |
| | | </if> |
| | | <if test="user.roleId!=null and user.roleId != ''"> |
| | | and bu.role_id = #{user.roleId} |
| | |
| | | ORDER BY bu.id |
| | | </select> |
| | | |
| | | |
| | | <!--保安员列表树 安员列表树,帅选无保安证,下拉tree--> |
| | | <select id="getSecurityApplyTree" resultType="org.springblade.modules.system.node.TreeNode"> |
| | | (select #{user.deptId} as id, |
| | | '全部' as name, |
| | | 0 as parentId |
| | | from blade_user) |
| | | |
| | | union all |
| | | |
| | | (select |
| | | bu.id, |
| | | bu.real_name as name, |
| | | #{user.deptId} parentId |
| | | from |
| | | blade_user bu |
| | | left join |
| | | blade_dept bd |
| | | on |
| | | bu.dept_id = bd.id |
| | | where |
| | | bu.is_deleted = 0 |
| | | and |
| | | bd.dept_category = 1 |
| | | and |
| | | (hold = 2 or hold = 3) |
| | | and bd.id = #{user.deptId} |
| | | ) |
| | | </select> |
| | | |
| | | </mapper> |