package com.artfess.uc.manager; import com.artfess.base.exception.SystemException; import com.artfess.base.manager.BaseManager; import com.artfess.base.model.CommonResult; import com.artfess.base.query.PageList; import com.artfess.base.query.QueryFilter; import com.artfess.uc.api.model.Group; import com.artfess.uc.model.Org; import com.artfess.uc.model.OrgJob; import com.artfess.uc.model.OrgPost; import com.artfess.uc.model.User; import com.artfess.uc.model.UserGroup; import com.artfess.uc.model.UserParams; import com.artfess.uc.model.UserRole; import com.artfess.uc.params.common.DataSyncObject; import com.artfess.uc.params.common.DataSyncVo; import com.artfess.uc.params.common.UserExportObject; import com.artfess.uc.params.echarts.ChartOption; import com.artfess.uc.params.group.GroupIdentity; import com.artfess.uc.params.params.ParamObject; import com.artfess.uc.params.user.TriggerVo; import com.artfess.uc.params.user.UserMarkObject; import com.artfess.uc.params.user.UserPolymer; import com.artfess.uc.params.user.UserPwdObject; import com.artfess.uc.params.user.UserRelObject; import com.artfess.uc.params.user.UserStatusVo; import com.artfess.uc.params.user.UserVo; import com.baomidou.mybatisplus.core.metadata.IPage; import com.fasterxml.jackson.databind.node.ArrayNode; import org.springframework.core.io.Resource; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; import java.util.Map; import java.util.Set; /** *
 * 描述:用户表 处理接口
 * 构建组:x5-bpmx-platform
 * 作者:ray
 * 邮箱:zhangyg@jee-soft.cn
 * 日期:2016-06-30 10:26:50
 * 版权:广州宏天软件有限公司
 * 
*/ public interface UserManager extends BaseManager { /** * 删除所有已逻辑删除的实体(物理删除) */ Integer removePhysical(); /** * 添加用户 * * @param user * @return */ User addUser(UserVo user) throws Exception; /** * 从第三方系统用户数据添加到本系统 * * @param user * @return */ User addUserFromExterUni(UserVo user) throws Exception; /** * 保存用户 * * @param userPolymer * @throws Exception */ void saveUser(UserPolymer userPolymer) throws Exception; /** * 更新用户 * * @param user */ void updateUser(UserVo user) throws Exception; /** * 更新用户IP */ void updateUserIP()throws Exception ; /** * 根据用户修改聊天皮肤 */ void updateUserSkin(String skin)throws Exception ; /** * 删除用户 * * @param userMark * @throws Exception */ CommonResult deleteUser(UserMarkObject userMark) throws Exception; /** * 获取用户 * * @param json * @return * @throws Exception */ UserVo getUser(String json) throws Exception; /** * 根据Account取定义对象。 * * @param account * @return */ User getByAccount(String account) throws Exception; /** * 不含用户组织关系 */ List getUserListByOrgId(String orgId) throws Exception; /** * 不含用户组织关系 * * @param queryFilter * @return */ List queryOrgUser(QueryFilter queryFilter) throws Exception; /** * 含组织用户关系表数据 * * @param queryFilter * @return */ @SuppressWarnings("rawtypes") List queryOrgUserRel(QueryFilter queryFilter) throws Exception; /** * 根据岗位编码获取用户列表 * * @param postCode * @return */ List getListByPostCode(String postCode) throws Exception; /** * 根据岗位ID获取用户列表 * * @param postId * @return */ List getListByPostId(String postId) throws Exception; /** * 根据职务ID获取用户列表 * * @param jobId * @return */ List getListByJobId(String jobId) throws Exception; /** * 根据角色ID获取用户列表 * * @param roleId * @return */ List getUserListByRoleId(String roleId) throws Exception; /** * 根据角色Code获取用户列表 * * @param roleCode * @return */ List getUserListByRoleCode(String roleCode) throws Exception; /** * 获取角色用户 * * @param filter * @return */ IPage getRoleUserQuery(QueryFilter filter) throws Exception; /** * 获取用户列表 * * @param queryFilter * @return * @throws Exception */ IPage getOrgUserQuery(QueryFilter queryFilter) throws Exception; /** * 根据email查询用户 * * @param email * @return */ List getByUserEmail(String email) throws Exception; /** * 获取用户的所有上级 * * @param underUserId * @return */ List getUpUsersByUserId(String underUserId) throws Exception; /** * 获取用户某组织下的上级 * * @param account * @param orgCode * @return */ User getUpUserByUserIdAndOrgId(String account, String orgCode) throws Exception; /** * 获取用户的所有下级 * * @param upUserId * @return */ List getUnderUsersByUserId(String upUserId) throws Exception; /** * 获取用户某组织下的下级用户 * * @param account * @param orgCode * @return */ List getUnderUserByUserIdAndOrgId(String account, String orgCode) throws Exception; /** * 根据工号取定义对象。 * * @param userNumber * @return */ User getByNumber(String userNumber) throws Exception; /** * 用户修改密码 */ CommonResult changUserPsd(UserPwdObject userPwdObject) throws Exception; /** * 修改用户密码 */ CommonResult updateUserPsw(UserPwdObject userPwdObject) throws Exception; /** * 保存用户参数 * * @param account * @param params * @return */ CommonResult saveUserParams(String account, List params) throws Exception; /** * 获取用户所有参数 * * @param account * @return * @throws Exception */ List getUserParams(String account) throws Exception; /** * 获取用户所有参数 * * @param account * @param code * @return * @throws Exception */ UserParams getParamByCode(String account, String code) throws Exception; /** * 获取用户所属主组织信息 * * @param userRelObject * @return * @throws Exception */ CommonResult getMainOrgByDemCode(UserRelObject userRelObject) throws Exception; /** * 获取用户所属岗位信息 * * @param userRelObject * @return * @throws Exception */ List getUserPosts(UserRelObject userRelObject) throws Exception; /** * 获取用户直属上级信息 * * @param userRelObject * @return * @throws Exception */ Set getImmeSuperior(UserRelObject userRelObject) throws Exception; /** * 根据用户账号(或工号)、维度、级别,获取用户直属下级信息 * * @param userRelObject * @return * @throws Exception */ Set getImmeUnders(UserRelObject userRelObject) throws Exception; /** * 根据用户账号(或工号)获取用户职务信息 * * @param json * @return * @throws Exception */ List getUserJobs(String json) throws Exception; /** * 根据用户账号(或工号)获取用户群组信息 * * @param json * @return * @throws Exception */ List getUserGroups(String json) throws Exception; /** * 定时获取AD新增人员信息 * * @param date AD同步时间 * @return * @throws Exception */ List getNewUsersFromAD(String date) throws Exception; /** * 根据角色编码、组织编码获取对应人员 * * @param roleCode * @param orgCode * @return * @throws Exception */ Set getByRoleCodeAndOrgCode(String roleCode, String orgCode) throws Exception; /** * 根据职务编码、组织编码获取对应人员 * * @param jobCode * @param orgCode * @return * @throws Exception */ Set getByJobCodeAndOrgCode(String jobCode, String orgCode) throws Exception; /** * 根据岗位编码、组织编码获取对应人员 * * @param postCode * @param orgCode * @return * @throws Exception */ Set getByPostCodeAndOrgCode(String postCode, String orgCode) throws Exception; /** * 获取指定用户的所有上级(下属管理) * * @param account * @return * @throws Exception */ List getUpUsersByUser(String account) throws Exception; /** * 获取指定用户在指定组织中的上级(下属管理) * * @param account * @param orgCode * @return * @throws Exception */ UserVo getUpUserByUserAndOrg(String account, String orgCode) throws Exception; /** * 获取指定用户的所有下级(下属管理) * * @param account * @return * @throws Exception */ List getUnderUsersByUser(String account) throws Exception; /** * 获取指定用户在指定组织中的下级(下属管理) * * @param account * @param orgCode * @return * @throws Exception */ List getUnderUserByUserAndOrg(String account, String orgCode) throws Exception; /** * 获取组织下人员 * * @param orgId * @param isMain 是否主岗位,不填则获取所有 * @return */ List getOrgUsers(String orgId, Boolean isMain) throws Exception; /** * 更新用户头像 * * @param account * @param photo * @throws Exception */ void updatePhoto(String account, String photo) throws Exception; /** * 禁用用户 * * @param userMark * @throws Exception */ CommonResult forbiddenUser(UserMarkObject userMark) throws Exception; /** * 激活用户 * * @param userMark * @throws Exception */ CommonResult activateUser(UserMarkObject userMark) throws Exception; /** * 用户离职 * * @param userMark * @throws Exception */ CommonResult leaveUser(UserMarkObject userMark) throws Exception; /** * 锁定用户 * @param userMark * @throws Exception */ CommonResult lockUser(UserMarkObject userMark) throws Exception; /** * 解锁用户 * @param userMark * @throws Exception */ CommonResult unLockUser(UserMarkObject userMark) throws Exception; /** * 导出用户 * * @param isOrg * @param isRole * @param isAll * @param queryFilter * @return * @throws Exception */ String exportUsers(boolean isOrg, boolean isRole, boolean isAll, QueryFilter queryFilter) throws Exception; /** * 通过岗位编码获取用户 * * @param postCode * @return */ List getUserByPost(String postCode) throws Exception; /** * 根据时间获取用户数据(数据同步) * * @param userExport * @return * @throws Exception */ List getUserByTime(UserExportObject userExport) throws Exception; /** * 根据时间获取用户参数数据(数据同步) * * @param btime * @param etime * @return * @throws Exception */ List getUserParamByTime(String btime, String etime) throws Exception; /** * 根据时间获取用户角色关系数据(数据同步) * * @param btime * @param etime * @return * @throws Exception */ List getUserRoleByTime(String btime, String etime) throws Exception; /** * 获取副本数据集合 * * @param dataSync * @return * @throws Exception */ DataSyncVo getSyncDataByTime(DataSyncObject dataSync) throws Exception; /** * 根据用户标识获取用户汇报关系图信息 * * @param json * @return * @throws Exception */ ChartOption getUserRelCharts(String json) throws Exception; /** * 根据组织编码获取组织的负责人 * * @param orgCode * @param isMain * @return * @throws Exception */ List getChargesByOrg(String orgCode, Boolean isMain) throws Exception; /** * 用于是否显示AD增量同步按钮 * * @return */ boolean showADButton(); /** * 批量设置用户状态 * * @return * @throws Exception */ void setStatus(UserStatusVo userStatusVo) throws Exception; /** * 判断账号是否已存在 * * @param account * @return * @throws Exception */ CommonResult isAccountExist(String account) throws Exception; /** * 判断工号是否已存在 * * @param userNumber * @return * @throws Exception */ CommonResult isUserNumberExist(String account, String userNumber) throws Exception; /** * 用户修改个人密码 * * @param userPwdObject * @return * @throws Exception */ CommonResult updateOneselfPsw(UserPwdObject userPwdObject) throws Exception; /** * 上传头像文件 * * @param file * @return */ CommonResult uploadPortrait(String account, MultipartFile file) throws Exception; /** * 下载头像文件 * * @param filename * @return * @throws Exception */ Resource downloadPortrait(String account, String filename) throws Exception; /** * 获取维度下人员(不传维度或组织信息,则获取的是所有加入组织的用户) * * @param filter * @return * @throws Exception */ IPage getDemUserQuery(QueryFilter filter) throws Exception; /** * 获取维度下人员(不传维度或组织信息,则获取的是所有加入组织的用户) * * @param filter * @return * @throws Exception */ IPage getUserByOrgQuery(QueryFilter filter) throws Exception; /** * 修改计划定时任务执行时间 * * @param triggerVo * @return * @throws Exception */ CommonResult setTrigger(TriggerVo triggerVo, String ip) throws Exception; /** * 根据用户id获取用户信息 * * @param userId * @return * @throws Exception */ CommonResult getUserById(String userId) throws Exception; /** * 修改用户基本信息 * * @param vo * @return * @throws Exception */ CommonResult saveUser(UserVo vo) throws Exception; /** * 查询实体对象 * * @param queryFilter 通用查询对象 * @throws SystemException * @return 分页结果 */ public PageList queryByType(QueryFilter queryFilter) throws SystemException; /** * 根据用户id删除 * * @param ids * @return */ CommonResult deleteUserByIds(String ids); /** * 根据 * * @param queryFilter * @return */ List queryUser(QueryFilter queryFilter); /** * 通过组织中的下属设置获取上级人员 * * @param userId * @param orgId * @param demId * @return * @throws Exception */ List getSuperFromUnder(String userId, String orgId, String demId) throws Exception; /** * 通过用户与维度获取上级人员 * * @param userId * @param demId * @return * @throws Exception */ List getSuperiorFromUnder(String userId, String demId) throws Exception; /** * 根据userid查询姓名及组织 * * @param userId * @return */ Map getUserDetailed(String userId); /** * 根据用户id获取用户所在部门负责人 * * @param userId * @return * @throws Exception */ List getDepHeader(String userId, Boolean isMain) throws Exception; /** * 根据部门id获取部门负责人 * * @param orgId * @return * @throws Exception */ List getDepHeaderByOrg(String orgId, Boolean isMain) throws Exception; /** * 根据用户id获取用户所属组织,岗位,角色相关信息 * * @param userId * @return */ List getGroupsByUserId(String userId, String type); /** * 根据用户id取用户信息,包含组织岗位 * * @param userId * @return * @throws IOException */ Map getUserDetailByAccountOrId(String userId) throws IOException; /** * 模糊查询用户列表 * * @param query * @return */ public List getUserByName(String query); Map calculateNodeUser(Map nodeMap); /** * 根据公众号id获取用户信息 * * @param openId * @return */ CommonResult getUserByOpenId(String openId); Map> getUserRightMapByIds(Set ids); CommonResult getUserByMobile(String mobile); /** * 根据签署数据获取用户信息 * * @param customSignDatas * @return */ ArrayNode getUserInfoBySignData(ArrayNode customSignDatas) throws Exception; IPage getGroupUsersPage(UserGroup userGroup, QueryFilter queryFilter); CommonResult getTokenByUserName(String userName); void userExport(List users, HttpServletResponse httpServletResponse) throws Exception; IPage selectShiftUser(QueryFilter queryFilter); /** * 获取还没进行企业微信同步的用户 * * @return */ List getUsersNotYetSyncWxWork(); /** * 根据微信通讯录的userid获取绑定的用户的用户信息 * * @param wxWorkId * @return */ User getUserByWxWorkId(String wxWorkId); /** * 获取还没进行钉钉同步的用户 * * @return */ List getUsersNotYetSyncDingtalk(); /** * 根据钉钉通讯录的userid获取绑定的用户的用户信息 * * @param dingtalkId * @return */ User getUserByDingtalkId(String dingtalkId); /** * 根据Account列表取定义对象。 * * @param list * @return */ List getByAccounts(List list) throws Exception; /** * 批量插入 * * @param list * @return */ boolean insertBatch(List list); /** * 批量更新 * * @param list * @return */ boolean updateBatch(List list); List getByCompanyRole(String company, String role); List getLeaderStep(String userId, Integer grade, boolean res) throws Exception; List getFgUsers(String orgId, String orgParam, String userParam); List getLeaderStepByOrgId(String orgId, Integer grade) throws Exception; }