package com.zcloud.service.system;

import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.entity.system.User;
import com.zcloud.util.ReturnMap;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 说明:用户服务接口
 * 作者:luoxiaobao
 * 官网:www.qdkjchina.com
 */
public interface UsersService {

	/**通过用户名获取用户信息
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public PageData findByUsername(PageData pd)throws Exception;

	/**通过用户ID获取用户信息
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public PageData findById(PageData pd)throws Exception;

	public List<PageData> listUserAndDept(PageData pd) throws  Exception;

	/** 获取获取部门账号
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public List<PageData> listUserbyDep(PageData pd)throws Exception;

	/**通过用户名称获取用户信息
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public PageData findByName(PageData pd)throws Exception;

	/**用户列表
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public List<PageData> userlistPage(Page page)throws Exception;

	/**用户列表
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public List<PageData> userSelectlistPage(Page page)throws Exception;

	/**通过用户ID获取用户信息和角色信息
	 * @param USER_ID
	 * @return
	 * @throws Exception
	 */
	public User getUserAndRoleById(String USER_ID) throws Exception;

	/**保存用户IP
	 * @param pd
	 * @throws Exception
	 */
	public void saveIP(PageData pd)throws Exception;

	/**通过邮箱获取数据
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public PageData findByEmail(PageData pd)throws Exception;

	/**通过编码获取数据
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public PageData findByNumbe(PageData pd) throws Exception;

	/**列出某角色下的所有用户
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public List<PageData> listAllUserByRoldId(PageData pd) throws Exception;

	/**用户列表(全部)
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public List<PageData> listAllUser(PageData pd)throws Exception;

	/**查询部门下用户
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public List<PageData> listUserByDept(PageData pd)throws Exception;

	/**用户列表(弹窗选择用)
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public List<PageData> listUsersBystaff(Page page)throws Exception;

	/**保存用户
	 * @param pd
	 * @throws Exception
	 */
	public void saveUser(PageData pd)throws Exception;

	/**保存用户系统皮肤
	 * @param pd
	 * @throws Exception
	 */
	public void saveSkin(PageData pd)throws Exception;

	/**修改用户
	 * @param pd
	 * @throws Exception
	 */
	public void editUser(PageData pd)throws Exception;
	public void editPassword(PageData pd)throws Exception;

	/**删除用户
	 * @param pd
	 * @throws Exception
	 */
	public void deleteUser(PageData pd)throws Exception;

	/**批量删除用户
	 * @param pd
	 * @throws Exception
	 */
	public void deleteAllUser(String[] USER_IDS)throws Exception;
	public List<PageData>  listUserBYids(String[] USER_IDS)throws Exception;

	/**修改用户小程序权限
	 * @param pd
	 * @throws Exception
	 */
	public void editUserFuns(PageData pd);

	/**查询小程序用户
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public PageData findAppUserById(PageData pd) throws Exception;

	/**用户同意协议
	 * @param pd
	 * @throws Exception
	 */
	public void agreeProtocol(PageData pd) throws Exception;

	/**
	 * 获取该企业下所有用户,用户判断是否重复
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public List<PageData> findUserNameAll (PageData pd)throws Exception;

	/**
	 * 	获取用户
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public List<PageData> findAllUser (PageData pd)throws Exception;



	/**获取账号及部门岗位
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public List<PageData> listUserDepPos(PageData pd) throws Exception;

	/**
	 * 查询公司员工总数
	 * @param pd
	 * @return
	 */
	public int getUserCount(PageData pd) throws Exception;

	/**
	 * 查询公司检查过清单的员工总数
	 * @param pd
	 * @return
	 */
	public int getWorkedUserCount(PageData pd) throws Exception;

	/**查询用户倒班周期数据
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public List<PageData> getUserWork(PageData pd)throws Exception;

	/**修改用户倒班周期
	 * @param pd
	 * @throws Exception
	 */
	public void editShiftWork(PageData pd) throws Exception;




	/**获取人员Cascader数据(人员ID,姓名,部门ID,部门级别)
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public List<PageData> listCascader(PageData pd)throws Exception;

	/**清除在线学习人员分类
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	void clearLearnerCategory(PageData pd)throws Exception;

	/**获取账号及部门岗位
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public List<PageData> listUserDepPoslistPage(Page page) throws Exception;
	/**修改公司名称时同步修改企业账号
	 * @param pd
	 * @throws Exception
	 */
	public void updateCornUser(PageData pd)throws Exception;
	/**查询用户名称及部门名称
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public PageData findUserDept(PageData pd)throws Exception;

	/**获取账号及部门岗位
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public List<PageData> listUserlistPage(Page page)throws Exception;

    List<PageData> listUserLeader(PageData pd) throws Exception;

	void updatePushCid(PageData pd)throws Exception;

	List<PageData> listAll(PageData pd)throws Exception;

	void editUserState(PageData pageData)throws Exception;

	ReturnMap saveUserNew(PageData pd) throws Exception;

	/**通过USERID查监管端用户
	 * @param pd
	 * @throws Exception
	 */
	PageData findByRegulatoryId(PageData pd) throws Exception;

	/**通过用户ID获取用户信息1
	 * @param pd
	 * @return
	 * @throws Exception
	 */
	public PageData findByIdForEmis(PageData pd)throws Exception;

	/**
	 * @Description: 修改人员定位卡号
	 * @Author: dearLin
	 * @Date: 2024/1/24/024 14:12
	 * @Param: [com.zcloud.entity.PageData] [pd]
	 * @Return: boolean
	 */
	String changeOrUpdUserCardNo(PageData pd) throws Exception;

	List<PageData> getUserCardNoAll(PageData departPd);

	List<PageData> selectUserListByUserIds(PageData selectPageData);

	/**
	 * @Description: 根据id查卡号
	 * @Author: dearLin
	 * @Date: 2024/1/29/029 9:05
	 * @Param: [com.zcloud.entity.PageData] [pageData]
	 * @Return: com.zcloud.entity.PageData
	 */
	PageData getUserByCardNo(PageData pageData);

	void removeCardNoUser(PageData pageData);

	void editUserCardNoByPid(PageData pageData);

	public PageData findByIdCard(PageData pd) throws Exception;

	List<PageData> simplelistPage(Page page) throws Exception;

	PageData getInfo(PageData request) throws Exception;

	void setState(PageData request) throws Exception;
}