/* * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the dreamlu.net developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: Chill 庄骞 (smallchill@163.com) */ package org.springblade.modules.system.mapper; import com.baomidou.mybatisplus.annotation.SqlParser; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.Param; import org.springblade.modules.dispatcher.vo.DispatcherVO; import org.springblade.modules.experience.entity.Experience; import org.springblade.modules.system.excel.SecurityExcel; import org.springblade.modules.system.excel.UserExcel; import org.springblade.modules.system.entity.User; import org.springblade.modules.system.node.TreeNode; import org.springblade.modules.system.vo.UserInfoDetail; import org.springblade.modules.system.vo.UserVO; import java.util.List; import java.util.Map; /** * Mapper 接口 * * @author Chill */ public interface UserMapper extends BaseMapper { /** * 自定义分页,带坐标 * * @param page * @param user * @return */ @SqlParser(filter = true) List selectUserPages(IPage page, @Param("user") UserVO user); /** * 自定义分页,带坐标 * * @param page * @param user * @return */ @SqlParser(filter = true) List selectUserPagesByAge(IPage page, @Param("user") UserVO user); /** * 自定义分页 * * @param page * @param user * @param deptIdList * @param tenantId * @return */ List selectUserPage(IPage page, @Param("user") User user, @Param("deptIdList") List deptIdList, @Param("tenantId") String tenantId); /** * 获取用户 * * @param tenantId * @param account * @param password * @return */ User getUser(String tenantId, String account, String password); /** * 获取导出用户数据 * * @return */ List exportUser(@Param("obj") Map param); /** * 通过 身份证号查询用户信息 * @param idCardNo 身份证号 * @return */ User getUserInfoByIdCardNo(String idCardNo); /** * 自定义用户列表(只有保安员) */ List selectUserPageSecurity(IPage page, @Param("user") User user); /** * 保安员列表,帅选无保安证 * @param page * @param user * @return */ IPage selectUserPageSecurityApply(IPage page,@Param("user") UserVO user); /** * 保安员列表树 安员列表树,帅选无保安证,下拉tree * @param user 用户信息 * @return */ @SqlParser(filter=true) List getSecurityApplyTree(@Param("user") UserVO user); /** * 派遣保安员列表树 安员列表树,帅选无保安证,下拉tree * @param user 用户信息 * @return */ @MapKey(value = "id") @SqlParser(filter=true) Map getSecurityDispatcherTree(@Param("user") UserVO user); List> selectInr(String deptid); /** * 查询当前年份已有的保安证编号 * @param pre 前缀 * @return */ int getSecurityPaperCount(@Param("pre") String pre); /** * 查询当前公司未持证保安没有报名的人员 * @param deptId * @return */ List getNotApplyIdList(@Param("deptId")String deptId); /** * 计算保安人员年龄 * @param userId * @return */ UserVO getUserAgeById(@Param("userId") Long userId); List> selectUser(); /** * 派遣人员 * @param deptid * @param jurisdiction * @return */ List> getDispaterInfo(@Param("deptid")String deptid, @Param("jurisdiction")String jurisdiction); /** * 工作汇报人员 * @param deptid * @param jurisdiction * @return */ List> getWorkReportInfo(@Param("type")String type, @Param("deptid")String deptid, @Param("jurisdiction")String jurisdiction); /** * 工作汇报人员(向民警) * @param deptid * @param jurisdiction * @return */ List> getWorkReportInfos(@Param("type")String type, @Param("deptid")String deptid, @Param("jurisdiction")String jurisdiction); /** * 根据保安员编码查询保安信息 * @param securityNumber 保安证编码 * @return */ UserVO getUserInfoBySecurityNumber(@Param("securityNumber") String securityNumber,@Param("cardid") String cardid); /** * 保安员信息 * @param user * @return */ UserVO getUserDetails(@Param("user") User user); DispatcherVO getDispatcherInfoByUserId(Long userId); /** * 查询账号相同的用户数量 * @param account * @return */ Integer selectCountAccount(@Param("account") String account); /** * 查询当前部门名称及父级部门名称 * @param deptId 部门名称 * @return */ @SqlParser(filter = true) List getDeptName(@Param("deptId") String deptId); /** * 查询用户表中未删除,未离职的用户信息 * @param username * @return */ User getUserInfo(@Param("account") String username); /** * 现场检查获取保安员 * @param jurisdiction * @return */ List> getSecurityInfo(@Param("jurisdiction")String jurisdiction); /** * 导出保安员信息 * @param user * @return */ List exportSecurityInfo(@Param("user") UserVO user); /** * 查询押运人员编码不为null的保安信息 * @return */ List> selectEquipent(); /** * 查詢派遣信息 * @param id 用戶id * @return */ DispatcherVO getUserDispatcherInfo(Long id); /** * 用户批量导入 * @param userList */ void batchUserList(@Param("list") List userList); /** * 从业记录批量导入 * @param experienceList */ void batchExperienceList(@Param("list") List experienceList); /** * 年龄分布查询 * @return */ List getAgeStatistics(@Param("user") UserVO user); /** * 根据用户 id 查询用户信息 * @param id * @return */ User getUserById(long id); /** * 根据手机号获取用户信息 * @param tenantId * @param phone * @return */ User getUserByPhone(@Param("tenantId")String tenantId,@Param("phone") String phone); /** * 按天查询 day 天未登录的人员ids集合信息 * @param day * @return */ List getMoreDayNotLoginUser(@Param("day")int day); /** * 用户冻结操作 * @param userIds */ void updateFreeze(@Param("list") List userIds); /** * 用户注销操作 * @param userIds */ void updateLogout(@Param("list") List userIds); /** * 判断是否报名 * @param id * @return */ User getUserIsApply(@Param("id") Long id); /** * 自定义查询详情信息 * @param id * @return */ UserVO getUserDetailById(@Param("id") Long id); /** * 查询未关联的保安员 * @return */ List getNotGlList(); UserInfoDetail getUserInfoDetail(@Param("id") String id); }