| | |
| | | <if test="user.roleAlias!=null and user.roleAlias != ''"> |
| | | and br.role_alias = '保安' |
| | | </if> |
| | | <if test="user.status!=null and user.status != '' and user.status != 6"> |
| | | <if test="user.status!=null and user.status != 6"> |
| | | and bu.status = #{user.status} |
| | | </if> |
| | | <if test="user.isFreeze!=null"> |
| | | and bu.is_freeze = #{user.isFreeze} |
| | | </if> |
| | | <if test="user.education!=null and user.education != ''"> |
| | | and bu.education = #{user.education} |
| | |
| | | <if test="user.account!=null and user.account != ''"> |
| | | and bu.account like concat('%', #{user.account},'%') |
| | | </if> |
| | | <if test="user.isFreeze!=null"> |
| | | and bu.is_freeze = #{user.isFreeze} |
| | | </if> |
| | | <if test="user.hold!=null and user.hold != ''"> |
| | | and bu.hold = #{user.hold} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="user.account!=null and user.account != ''"> |
| | | and account like concat('%', #{user.account},'%') |
| | | </if> |
| | | <if test="user.isFreeze!=null"> |
| | | and bu.is_freeze = #{user.isFreeze} |
| | | </if> |
| | | <if test="user.roleId!=null and user.roleId != ''"> |
| | | and (br.role_alias = '公安管理员' or br.role_alias = '民警') |
| | |
| | | <if test="user.sex!=null and user.sex != ''"> |
| | | and bu.sex = #{user.sex} |
| | | </if> |
| | | <if test="user.isFreeze!=null"> |
| | | and bu.is_freeze = #{user.isFreeze} |
| | | </if> |
| | | <if test="user.dispatch!=null and user.dispatch != ''"> |
| | | <if test="user.dispatch==1"> |
| | | and (bu.dispatch = #{user.dispatch} or bu.dispatch is null) |
| | |
| | | <if test="user.roleId!=null and user.roleId != ''"> |
| | | and bu.role_id = #{user.roleId} |
| | | </if> |
| | | <if test="user.isFreeze!=null"> |
| | | and bu.is_freeze = #{user.isFreeze} |
| | | </if> |
| | | <if test="user.status!=null and user.status != ''"> |
| | | and bu.status = #{user.status} |
| | | </if> |
| | |
| | | |
| | | <!--保安员列表树 安员列表树,帅选无保安证,下拉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 |
| | | a.id, |
| | | a.name, |
| | | a.type, |
| | | a.parentId |
| | | from ( |
| | | select |
| | |
| | | bu.is_apply isApply, |
| | | bu.is_train isTrain, |
| | | bu.real_name as name, |
| | | if(es.user_id is not null,1,2) as type, |
| | | #{user.deptId} parentId |
| | | from |
| | | blade_user bu |
| | | left join |
| | | blade_dept bd |
| | | on |
| | | bu.dept_id = bd.id |
| | | left join |
| | | blade_role br |
| | | on |
| | | br.id = bu.role_id |
| | | from blade_user bu |
| | | left join blade_dept bd on bu.dept_id = bd.id |
| | | left join blade_role br on br.id = bu.role_id |
| | | left join (select user_id,max(id) from exam_score where (qualified =1 or qualified =3) GROUP BY user_id) es |
| | | on es.user_id = bu.id |
| | | where |
| | | bu.is_deleted = 0 |
| | | and bu.status = 1 |
| | | bu.is_deleted = 0 and bu.status = 1 and bu.is_freeze = 0 |
| | | and (bu.examination_type != 1 or bu.examination_type is null) |
| | | and (hold = 2 or hold = 3) |
| | | and bd.id = #{user.deptId} |
| | |
| | | <if test="user.examType==2"> |
| | | and a.isTrain != 1 |
| | | </if> |
| | | ) |
| | | </select> |
| | | |
| | | |
| | |
| | | </if> |
| | | and bu.status = 1 |
| | | and bu.is_deleted = 0 |
| | | and bu.is_freeze = 0 |
| | | </select> |
| | | |
| | | |
| | |
| | | <if test="user.isAvatar==2"> |
| | | and (bu.avatar is null or bu.avatar="") |
| | | </if> |
| | | <if test="user.isFreeze!=null"> |
| | | and bu.is_freeze = #{user.isFreeze} |
| | | </if> |
| | | <if test="user.unitName!=null and user.unitName != ''"> |
| | | and bu.unit_name like concat('%', #{user.unitName},'%') |
| | | </if> |
| | |
| | | |
| | | <!--用户冻结操作--> |
| | | <update id="updateFreeze"> |
| | | update blade_user set is_deleted = 1 |
| | | update blade_user set is_freeze = 1 |
| | | <choose> |
| | | <when test="list!=null and list.size()>0"> |
| | | where id in |