using System.Collections.Generic; using System.Threading.Tasks; using NPP.SmartSchedue.Api.Contracts.Core.Enums; using ZhonTai.Admin.Core.Repositories; namespace NPP.SmartSchedue.Api.Contracts.Domain.Notification; /// /// 人员组仓储接口 /// public interface IPersonnelGroupRepository : IRepositoryBase { /// /// 根据启用状态获取人员组列表 /// Task> GetByEnabledAsync(bool enabled); /// /// 根据人员组类型获取人员组列表 /// Task> GetByGroupTypeAsync(PersonnelGroupTypeEnum groupType); /// /// 检查人员组名称是否存在 /// Task ExistsGroupNameAsync(string groupName, long? excludeId = null); /// /// 获取包含指定人员的人员组列表 /// Task> GetGroupsContainingPersonnelAsync(long personnelId); /// /// 获取包含指定部门的人员组列表 /// Task> GetGroupsContainingDepartmentAsync(long departmentId); /// /// 获取包含指定职位的人员组列表 /// Task> GetGroupsContainingPositionAsync(string position); /// /// 计算人员组的实际人员数量 /// 这个方法返回一个估算值,实际计算需要在Service层进行 /// 因为需要查询人员表和考虑动态规则 /// Task CalculatePersonnelCountAsync(long personnelGroupId); }